-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (64 loc) · 1.81 KB
/
envtest.yml
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Hi Mascot
on: push
# global env var
env:
mascot: Mona
defaults:
run:
shell: bash
jobs:
windows_job:
name: Windows Job
runs-on: ubuntu-latest
steps:
- name: uses wf env
run: echo 'Hi ${{ env.mascot }}' # Hi Mona
- name: uses step env
run: echo 'Hi ${{ env.mascot }}' # Hi Octocat
env:
mascot: Octocat
linux_job:
name: Linux Job
needs: windows_job
runs-on: ubuntu-latest
env:
mascot: Tux
outputs:
mascot: ${{ steps.outstep.outputs.mascot }}
steps:
- name: uses job env
run: echo 'Hi ${{ env.mascot }}' # Hi Tux
- name: set gritty env var
run: echo "mascot=Gritty" >> $GITHUB_ENV
- name: uses changed job env
run: echo 'Hi ${{ env.mascot }}' # Hi Gritty
- name: uses step env
run: echo "Hi ${{ env.mascot }}" # Hi Mika
env:
mascot: Mika
- name: uses job env again
run: echo 'Hi ${{ env.mascot }}' # Hi Gritty
- name: set output using job env
id: outstep
run: echo "mascot=${{ env.mascot }}" >> $GITHUB_OUTPUT # Gritty
macos_job:
name: macOS Job
needs: linux_job
runs-on: ubuntu-latest
steps:
- name: uses wf env
run: echo 'Hi ${{ env.mascot }}' # Hi Mona
- name: uses prior job output
run: echo 'Hi ${{ needs.linux_job.outputs.mascot }}' # Hi Gritty
post:
name: Post
runs-on: ubuntu-latest
# always runs, regardless of the outcome of any of the previous steps
if: always()
needs: [windows_job, linux_job, macos_job]
steps:
- name: Post
run: |
echo 'Post Steps, such as notifications, etc.'
echo "::notice::I'm a post step!"
echo "::error::What do we need to do in Post?"