Some workflow #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Some workflow | |
on: | |
workflow_run: | |
workflows: ["other workflow"] | |
types: | |
- completed | |
jobs: | |
some-job: | |
runs-on: ubuntu-latest | |
if: > | |
github.event.workflow_run.event == 'pull_request' && | |
github.event.workflow_run.conclusion == 'success' | |
steps: | |
- name: download pr artifact | |
uses: dawidd6/action-download-artifact@v2 | |
with: | |
workflow: ${{ github.event.workflow_run.workflow_id }} | |
run_id: ${{ github.event.workflow_run.id }} | |
name: artifact | |
# Save PR id to output | |
- name: save artifact data | |
id: artifact | |
run: echo "::set-output name=id::$(<artifact.txt)" | |
- name: usage artifact | |
id: deploy | |
run: | | |
echo ${{ steps.artifact.outputs.id }} |