Skip to content

Commit 4dff8f2

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 7d25b80 commit 4dff8f2

File tree

2 files changed

+24
-4
lines changed

2 files changed

+24
-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: 13 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,16 +87,20 @@ jobs:
8287
- name: Run
8388
id: run
8489
# yamllint disable rule:line-length
90+
env:
91+
working-directory: ${{ runner.temp }}
92+
file:
8593
run: |
8694
set -x
95+
find .
8796
export ZPC_RUN_MODE="docker"
8897
export ZPC_COMMAND="docker run ${{ env.project-name }}"
8998
$ZPC_COMMAND --version
9099
docker-compose pull
91100
export ZPC_COMMAND="docker-compose up --abort-on-container-exit"
92101
export z_wave_stack_binaries_bin_dir="${{ runner.temp }}/z-wave-stack-binaries/bin"
93102
export ZPC_ARGS="--log.level=d"
94-
./scripts/tests/z-wave-stack-binaries-test.sh
103+
./tests/scripts/z-wave-stack-binaries-test.sh
95104
# yamllint enable rule:line-length
96105
continue-on-error: true
97106

0 commit comments

Comments
 (0)