Sample Forking Workflow #8
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: Sample Forking Workflow | |
on: | |
workflow_dispatch: | |
jobs: | |
starting-job: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v4 | |
- name: Echo Github Context | |
env: | |
GITHUB_CONTEXT: ${{ toJson(github) }} | |
run: | | |
echo "$GITHUB_CONTEXT" | |
- name: Exit Success | |
run: | | |
exit 0 | |
forked-job-1: | |
runs-on: ubuntu-latest | |
needs: starting-job | |
steps: | |
- name: Echo Github Context | |
env: | |
GITHUB_CONTEXT: ${{ toJson(github) }} | |
run: | | |
echo "$GITHUB_CONTEXT" | |
- name: Exit Success | |
run: | | |
exit 0 | |
forked-job-2: | |
runs-on: ubuntu-latest | |
needs: starting-job | |
steps: | |
- name: Echo Github Context | |
env: | |
GITHUB_CONTEXT: ${{ toJson(github) }} | |
run: | | |
echo "$GITHUB_CONTEXT" | |
- name: Exit Failure | |
run: | | |
exit 1 | |
wrap-up: | |
if: always() | |
runs-on: ubuntu-latest | |
needs: [ forked-job-1, forked-job-2 ] | |
steps: | |
- name: Echo Github Context | |
env: | |
GITHUB_CONTEXT: ${{ toJson(github) }} | |
run: | | |
echo "$GITHUB_CONTEXT" | |
- name: Exit Success | |
run: | | |
exit 0 |