Skip to content

Sample Forking Workflow #14

Sample Forking Workflow

Sample Forking Workflow #14

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 0
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