Skip to content

Commit e7c64e2

Browse files
committed
fix(ci): tests: Prefer artfact over checkout action
GraphQL complain about it, and GH suggests to use assets, It is unclear to me how this can be exploited in fork on job without pull_request_target (that one could be exploited). Signed-off-by: Philippe Coval <[email protected]>
1 parent fc15549 commit e7c64e2

File tree

2 files changed

+22
-4
lines changed

2 files changed

+22
-4
lines changed

.github/workflows/build.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,14 @@ jobs:
5858
# yamllint disable-line
5959
name: ${{ github.event.repository.name }}-${{ steps.describe.outputs.describe }}
6060
path: dist/
61+
62+
- name: Upload tests artifacts
63+
# yamllint disable-line rule:line-length
64+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
65+
with:
66+
# yamllint disable-line
67+
name: ${{ github.event.repository.name }}-tests
68+
path: |
69+
scripts/tests
70+
docker-compose.yml
71+

.github/workflows/test.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,16 @@ jobs:
4747
rm -rfv "${{env.file}}"
4848
echo "TODO: https://docs.docker.com/engine/security/trust/"
4949
# yamllint enable rule:line-length
50+
51+
- name: Download tests artifacts
5052
# yamllint disable-line rule:line-length
51-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
53+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
5254
with:
53-
fetch-depth: 0
54-
ref: ${{ github.event.workflow_run.head_commit.id }}
55+
# yamllint disable-line
56+
name: ${{ github.event.repository.name }}-tests
57+
github-token: ${{ secrets.GH_SL_ACCESS_TOKEN }}
58+
run-id: ${{ github.event.workflow_run.id }}
59+
path: ${{ runner.temp }}
5560

5661
- name: Download embedded applications package
5762
# yamllint disable-line rule:line-length
@@ -82,6 +87,8 @@ jobs:
8287
- name: Run
8388
id: run
8489
# yamllint disable rule:line-length
90+
env:
91+
file: ${{ runner.temp }}/tests/z-wave-stack-binaries-test.sh
8592
run: |
8693
set -x
8794
export ZPC_RUN_MODE="docker"
@@ -91,7 +98,7 @@ jobs:
9198
export ZPC_COMMAND="docker-compose up --abort-on-container-exit"
9299
export z_wave_stack_binaries_bin_dir="${{ runner.temp }}/z-wave-stack-binaries/bin"
93100
export ZPC_ARGS="--log.level=d"
94-
./scripts/tests/z-wave-stack-binaries-test.sh
101+
${{ env.file }}
95102
# yamllint enable rule:line-length
96103
continue-on-error: true
97104

0 commit comments

Comments
 (0)