-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yaml
More file actions
48 lines (43 loc) · 1.21 KB
/
Copy pathaction.yaml
File metadata and controls
48 lines (43 loc) · 1.21 KB
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
name: Run Simulation in Docker
description: Clone a repo, run a simulation command in Docker, and upload an artifact
inputs:
repo:
description: GitHub repo to checkout
required: true
ref:
description: Branch or tag to checkout
required: true
command:
description: Command to run inside Docker
required: true
artifact_file:
description: File to upload as artifact
required: true
runs:
using: "composite"
steps:
- uses: actions/checkout@v3
with:
repository: ${{ inputs.repo }}
ref: ${{ inputs.ref }}
- name: Get UID and GID
id: ids
shell: bash
run: |
echo "uid=$(id -u)" >> $GITHUB_OUTPUT
echo "gid=$(id -g)" >> $GITHUB_OUTPUT
- name: Run simulation in Docker
shell: bash
run: |
docker run --rm \
--entrypoint bash \
-u ${{ steps.ids.outputs.uid }}:${{ steps.ids.outputs.gid }} \
-v ${{ github.workspace }}:/work \
-w /work \
hpretl/iic-osic-tools \
-c "source ~/.bashrc; ${{ inputs.command }}"
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: simulation-output
path: ${{ inputs.artifact_file }}