-
Notifications
You must be signed in to change notification settings - Fork 1
147 lines (138 loc) · 5.03 KB
/
test.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
---
name: test
on: pull_request
permissions: {}
jobs:
path-filter:
# Get changed files to filter jobs
timeout-minutes: 30
outputs:
update-aqua-checksums: ${{steps.changes.outputs.update-aqua-checksums}}
renovate-config-validator: ${{steps.changes.outputs.renovate-config-validator}}
ghalint: ${{steps.changes.outputs.ghalint}}
go-mod-tidy: ${{steps.changes.outputs.go-mod-tidy}}
test: ${{steps.changes.outputs.test}}
update-readme: ${{steps.changes.outputs.update-readme}}
runs-on: ubuntu-latest
permissions: {}
steps:
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: changes
with:
filters: |
update-aqua-checksums:
- aqua/aqua.yaml
- aqua/imports/*.yaml
- aqua/aqua-checksums.json
- .github/workflows/test.yaml
- .github/workflows/wc-update-aqua-checksums.yaml
renovate-config-validator:
- renovate.json5
- .github/workflows/test.yaml
- .github/workflows/wc-renovate-config-validator.yaml
ghalint:
- .github/workflows/*.yaml
- aqua/aqua.yaml
- aqua/imports/ghalint.yaml
- ghalint.yaml
go-mod-tidy:
- go.mod
- go.sum
- "**.go"
- .github/workflows/test.yaml
- .github/workflows/wc-go-mod-tidy.yaml
test:
- go.mod
- go.sum
- "**.go"
- aqua/imports/golangci-lint.yaml
- .github/workflows/test.yaml
- .github/workflows/wc-test.yaml
update-readme:
- README.md
- docs/HEADER.md
- docs/LIST.md
- docs/FOOTER.md
enable-automerge:
uses: ./.github/workflows/wc-enable-auto-merge.yaml
needs:
- status-check
permissions:
contents: write # For enable automerge
pull-requests: write # For enable automerge
# "! failure() && ! cancelled()" is required. success() returns false if dependent jobs are skipped.
# https://github.com/community/community/discussions/45058
# By default success() is used so we have to override success() by "! failure() && ! cancelled()"
if: |
! failure() && ! cancelled() && github.event.pull_request.user.login == 'renovate[bot]' && contains(github.event.pull_request.body, ' **Automerge**: Enabled.')
secrets:
gh_app_id: ${{secrets.APP_ID_AQUAPROJ_AQUA}}
gh_app_private_key: ${{secrets.APP_PRIVATE_KEY_AQUAPROJ_AQUA}}
enable-automerge-update-list:
uses: ./.github/workflows/wc-enable-auto-merge.yaml
needs:
- status-check
permissions:
contents: write # For enable automerge
pull-requests: write # For enable automerge
# "! failure() && ! cancelled()" is required. success() returns false if dependent jobs are skipped.
# https://github.com/community/community/discussions/45058
# By default success() is used so we have to override success() by "! failure() && ! cancelled()"
if: |
! failure() && ! cancelled() && startsWith(github.head_ref, 'update-list-')
secrets:
gh_app_id: ${{secrets.APP_ID_AQUAPROJ_AQUA}}
gh_app_private_key: ${{secrets.APP_PRIVATE_KEY_AQUAPROJ_AQUA}}
status-check:
uses: ./.github/workflows/wc-status-check.yaml
permissions: {}
if: failure()
needs:
- renovate-config-validator
- update-aqua-checksums
- ghalint
- test
- go-mod-tidy
- update-readme
renovate-config-validator:
uses: ./.github/workflows/wc-renovate-config-validator.yaml
needs: path-filter
if: needs.path-filter.outputs.renovate-config-validator == 'true'
permissions:
contents: read
update-aqua-checksums:
needs: path-filter
if: needs.path-filter.outputs.update-aqua-checksums == 'true'
uses: ./.github/workflows/wc-update-aqua-checksums.yaml
permissions:
contents: read
secrets:
gh_app_id: ${{secrets.APP_ID_AQUAPROJ_AQUA}}
gh_app_private_key: ${{secrets.APP_PRIVATE_KEY_AQUAPROJ_AQUA}}
ghalint:
needs: path-filter
if: needs.path-filter.outputs.ghalint == 'true'
uses: ./.github/workflows/wc-ghalint.yaml
permissions: {}
test:
uses: ./.github/workflows/wc-test.yaml
if: needs.path-filter.outputs.test == 'true'
needs: path-filter
permissions: {}
update-readme:
uses: ./.github/workflows/wc-update-readme.yaml
if: needs.path-filter.outputs.update-readme == 'true'
needs: path-filter
permissions: {}
secrets:
gh_app_id: ${{secrets.APP_ID_AQUAPROJ_AQUA}}
gh_app_private_key: ${{secrets.APP_PRIVATE_KEY_AQUAPROJ_AQUA}}
go-mod-tidy:
uses: ./.github/workflows/wc-go-mod-tidy.yaml
needs: path-filter
if: needs.path-filter.outputs.go-mod-tidy == 'true'
secrets:
gh_app_id: ${{secrets.APP_ID_AQUAPROJ_AQUA}}
gh_app_private_key: ${{secrets.APP_PRIVATE_KEY_AQUAPROJ_AQUA}}
permissions:
contents: read