-
Notifications
You must be signed in to change notification settings - Fork 1
/
action.yaml
59 lines (51 loc) · 1.56 KB
/
action.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# action.yml
name: 'AutoBOM'
description: 'Automatically export and render your hardware project'
inputs:
repo-ref:
description: "Reference to the repo to run AutoBOM on"
required: true
branding:
icon: 'crosshair'
color: 'yellow'
runs:
using: 'composite'
steps:
# - name: Replace Github ENV Variables in Compose
# run: |
# envsubst < $GITHUB_ACTION_PATH/docker-compose.yaml.template > $GITHUB_ACTION_PATH/docker-compose.yml
# ls
# shell: bash
- name: Replace Github ENV Variables in Compose
run: |
set -x
sed -i "s|\${GITHUB_ACTION_PATH}|$GITHUB_ACTION_PATH|g" ${{ github.action_path }}/docker-compose.yaml
shell: bash
- name: Start Render Engines
run: |
set -x
docker compose -f ${{ github.action_path }}/docker-compose.yaml up -d
shell: bash
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9' # You can change this version based on your needs
# Step 2: Install `uv` using pip
- name: Install UV package manager
run: |
python -m pip install --upgrade pip
pip install uv
shell: bash
- name: Run AutoBOM
run: |
set -x
uv run --project $GITHUB_ACTION_PATH autobom
shell: bash
env:
GITHUB_ACTION_PATH: $GITHUB_ACTION_PATH # The action's path
GITHUB_WORKSPACE: $GITHUB_WORKSPACE # The user's repo workspace
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: Autobom
path: ./autobom