From 958dd02004ff1cd9792920dfc72c3f68e9634078 Mon Sep 17 00:00:00 2001 From: Paul Klauser Date: Mon, 3 Jun 2024 13:16:13 -0400 Subject: [PATCH] Conditionally set run ID when downloading artifacts This enables the workflow to be reused. --- .github/workflows/device-tests.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/device-tests.yml b/.github/workflows/device-tests.yml index c3ebc3db..cf8ed55c 100644 --- a/.github/workflows/device-tests.yml +++ b/.github/workflows/device-tests.yml @@ -21,9 +21,11 @@ jobs: steps: - uses: haya14busa/action-workflow_run-status@v1 if: ${{ github.event_name == 'workflow_run' }} + - name: Set RUN_ID + run: echo "RUN_ID=${{ github.event_name == 'workflow_run' && github.event.workflow_run.id || github.run_id }}" >> $GITHUB_ENV - uses: actions/download-artifact@v4 with: - run-id: ${{github.event.workflow_run.id }} + run-id: ${{ env.RUN_ID }} github-token: ${{ secrets.GITHUB_TOKEN }} - name: Decode Firebase Service Account JSON