Skip to content

Instantly share code, notes, and snippets.

@pgreze
Last active February 18, 2023 01:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pgreze/46647ecb851d7f031a007be9674c5f35 to your computer and use it in GitHub Desktop.
Save pgreze/46647ecb851d7f031a007be9674c5f35 to your computer and use it in GitHub Desktop.
Showcasing Github Actions workflow flatten hierarchy when using depth > 2
on:
pull_request:
push:
branches:
- main
jobs:
level1-hello:
runs-on: ubuntu-latest
steps:
- shell: bash
run: echo "Hello from level 1"
level1-uses:
uses: ./.github/workflows/level2.yml
secrets: inherit
on: [workflow_call]
jobs:
level2-hello:
runs-on: ubuntu-latest
steps:
- shell: bash
run: echo "Hello from level 2"
level2-uses:
uses: ./.github/workflows/level3.yml
secrets: inherit
on: [workflow_call]
jobs:
level3-hello:
runs-on: ubuntu-latest
steps:
- shell: bash
run: echo "Hello from level 3"
level3-world:
runs-on: ubuntu-latest
steps:
- shell: bash
run: echo "End of the hierarchy"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment