-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (76 loc) · 2.59 KB
/
waste_time.yaml
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
82
83
on:
pull_request:
types: [opened, edited, synchronize, reopened]
push:
branches:
- main
- ci/**
concurrency:
# Don't cancel on main, creating a PR when a push workflow is already going will cancel the push workflow in favour of the PR workflow
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_id || github.event.number && github.head_ref || github.ref_name }}
cancel-in-progress: true
# For Draft PRs, we only want the herpaderp step 1
# For Non-Draft PRs, we want all the steps
jobs:
show-variables:
runs-on: ubuntu-latest
name: "Show variables"
steps:
- name: "The actual showing of variables"
run: |
echo Workflow is .${{ github.workflow }}.
echo Ref is .${{ github.ref }}.
echo Run ID is .${{ github.run_id }}.
echo PR number is .${{ github.event.number }}.
echo Group boils down to .${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_id || github.ref }}..
echo Test group .${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_id || github.event.number && github.head_ref || github.ref_name }}..
mootrix:
runs-on: ${{ matrix.os }}
name: Mootrix ${{ matrix.os }} - ${{ matrix.config.moo }}
strategy:
matrix:
os: [ macOS-11, ubuntu-latest ]
config:
- {"moo": "boo"}
- {"moo": "blergh"}
include:
- os: ubuntu-20.04
config:
moo: "herpaderp"
steps:
- name: ${{ matrix.config.moo }} should only run for herpaderp on draft
if: ${{ github.event.pull_request.draft == true && matrix.config.moo == 'herpaderp' }}
run: |
echo "Doing the thing"
sleep 20
echo "The thing is done"
- name: Always run
run: |
echo "This thing always happens"
sleep 20
echo "And has now been concluded"
meowtrix:
runs-on: ${{ matrix.os }}
name: Meowtrix ${{ matrix.os }} - ${{ matrix.config.moo }}
if: '${{ ! github.event.pull_request.draft }}'
strategy:
matrix:
os: [ macOS-11, ubuntu-latest ]
config:
- {"moo": "boo"}
- {"moo": "blergh"}
include:
- os: ubuntu-20.04
config:
moo: "herpaderp"
steps:
- name: First step
run: |
echo "Doing the thing"
sleep 20
echo "The thing is done"
- name: Second step
run: |
echo "Doing the other thing"
sleep 20
echo "The other thing is also done"