-
-
Notifications
You must be signed in to change notification settings - Fork 42
149 lines (136 loc) · 4.52 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
148
149
name: test
on: pull_request
concurrency:
group: ${{ github.workflow }}--${{ github.ref }}
cancel-in-progress: true
jobs:
path-filter:
# Get changed files to filter jobs
timeout-minutes: 10
outputs:
update-aqua-checksums: ${{steps.changes.outputs.update-aqua-checksums}}
update-aqua-checksums-install: ${{steps.changes.outputs.update-aqua-checksums-install}}
renovate-config-validator: ${{steps.changes.outputs.renovate-config-validator}}
ghalint: ${{steps.changes.outputs.ghalint}}
shellcheck: ${{steps.changes.outputs.shellcheck}}
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/*.yaml
- aqua/aqua-checksums.json
- .github/workflows/test.yaml
- .github/workflows/wc-update-aqua-checksums.yaml
update-aqua-checksums-install:
- install/aqua.yaml
- install/aqua/*.yaml
- install/aqua-checksums.json
- .github/workflows/test.yaml
- .github/workflows/wc-update-aqua-checksums-install.yaml
renovate-config-validator:
- renovate.json5
- .github/workflows/test.yaml
- .github/workflows/wc-renovate-config-validator.yaml
ghalint:
- .github/workflows/*.yaml
- aqua/ghalint.yaml
build-schema:
- .github/workflows/test.yaml
- .github/workflows/wc-deploy-schema.yaml
- "schema/**"
shellcheck:
- .github/workflows/test.yaml
- .github/workflows/wc-shellcheck.yaml
- aqua/shellcheck.yaml
- "**/*.sh"
status-check:
# This job is used for main branch's branch protection rule's status check.
# If all dependent jobs succeed or are skipped this job succeeds.
timeout-minutes: 10
runs-on: ubuntu-latest
needs:
- update-aqua-checksums
- update-aqua-checksums-install
- renovate-config-validator
- ghalint
- build-schema
- create-pr-branch
- format
- test
- hide-comment
permissions: {}
if: failure()
steps:
- run: exit 1
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}}
gh_app_private_key: ${{secrets.APP_PRIVATE_KEY}}
update-aqua-checksums-install:
needs: path-filter
if: needs.path-filter.outputs.update-aqua-checksums-install == 'true'
uses: ./.github/workflows/wc-update-aqua-checksums-install.yaml
permissions:
contents: read
secrets:
gh_app_id: ${{secrets.APP_ID}}
gh_app_private_key: ${{secrets.APP_PRIVATE_KEY}}
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
ghalint:
needs: path-filter
if: needs.path-filter.outputs.ghalint == 'true'
uses: ./.github/workflows/wc-ghalint.yaml
permissions: {}
shellcheck:
needs: path-filter
if: needs.path-filter.outputs.shellcheck == 'true'
uses: ./.github/workflows/wc-shellcheck.yaml
permissions: {}
build-schema:
uses: ./.github/workflows/wc-deploy-schema.yaml
permissions:
contents: write
test:
uses: ./.github/workflows/wc-test.yaml
permissions: {}
create-pr-branch:
uses: ./.github/workflows/wc-create-pr-branch.yaml
if: github.event.pull_request.user.login == 'suzuki-shunsuke'
permissions:
contents: write
pull-requests: write
issues: write
with:
pr: ${{github.event.pull_request.number}}
secrets:
gh_app_id: ${{secrets.APP_ID}}
gh_app_private_key: ${{secrets.APP_PRIVATE_KEY}}
hide-comment:
uses: ./.github/workflows/wc-hide-comment.yaml
if: |
! github.event.pull_request.head.repo.fork
permissions: {}
secrets:
gh_app_id: ${{secrets.APP_ID}}
gh_app_private_key: ${{secrets.APP_PRIVATE_KEY}}
format:
uses: ./.github/workflows/wc-format.yaml
permissions: {}
secrets:
gh_app_id: ${{secrets.APP_ID}}
gh_app_private_key: ${{secrets.APP_PRIVATE_KEY}}