-
-
Notifications
You must be signed in to change notification settings - Fork 3
36 lines (31 loc) · 832 Bytes
/
dependent-jobs.yml
File metadata and controls
36 lines (31 loc) · 832 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# https://docs.github.com/en/actions/learn-github-actions/managing-complex-workflows#creating-dependent-jobs
name: Dependent jobs
on: push
jobs:
setup:
runs-on: ubuntu-latest
steps:
- run: echo "1. Setup"
build:
needs: setup
runs-on: ubuntu-latest
steps:
- run: echo "2. Build"
test:
needs: build
runs-on: ubuntu-latest
steps:
- run: echo "3. Test"
release:
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release-created.outputs.RELEASE_CREATED }}
steps:
- run: echo "RELEASE_CREATED=true" >> $GITHUB_OUTPUT
id: release-created
publish:
needs: [test, release]
runs-on: ubuntu-latest
if: needs.release.outputs.release_created == 'true'
steps:
- run: echo "${{ needs.release.outputs.release_created }}"