I want to setup github actions such that creating a pull request against master will trigger a workflow that builds and unit-tests the app. Then, once accepted and merged, an other workflow should be triggered that uses the build artifacts and deploys them.
So I need a way to cross-reference from the “merged”-Workflow to the previous “PR” workflow. This can be done with actions/download-artifact@v4
like so:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: my_artifact
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ secrets.GITHUB_TOKEN }}
(see this answer)
But how can I retrieve the workflow_run.id
of the other workflow?