-
-
Notifications
You must be signed in to change notification settings - Fork 4
93 lines (86 loc) · 2.88 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
---
name: test
on: pull_request
permissions: {}
jobs:
path-filter:
# Get changed files to filter jobs
timeout-minutes: 10
outputs:
renovate-config-validator: ${{steps.changes.outputs.renovate-config-validator}}
ghalint: ${{steps.changes.outputs.ghalint}}
preset: ${{steps.changes.outputs.preset}}
runs-on: ubuntu-latest
permissions: {}
steps:
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: changes
with:
filters: |
renovate-config-validator:
- renovate.json5
preset:
- "*.json"
ghalint:
- .github/workflows/*.yaml
- aqua/ghalint.yaml
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:
- renovate-config-validator
- validate-presets
- ghalint
permissions: {}
if: failure()
steps:
- run: exit 1
renovate-config-validator:
# Validate Renovate Configuration by renovate-config-validator.
uses: suzuki-shunsuke/renovate-config-validator-workflow/.github/workflows/validate.yaml@e8effbd185cbe3874cddef63f48b8bdcfc9ada55 # v0.2.4
needs: path-filter
if: needs.path-filter.outputs.renovate-config-validator == 'true'
permissions:
contents: read
validate-presets:
timeout-minutes: 15
runs-on: ubuntu-latest
needs: path-filter
if: needs.path-filter.outputs.preset == 'true'
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- uses: aquaproj/aqua-installer@e2d0136abcf70b7a2f6f505720640750557c4b33 # v3.1.1
with:
aqua_version: v2.44.0
- run: ci-info run | sed "s/^export //" >> "$GITHUB_ENV"
env:
GITHUB_TOKEN: ${{ github.token }}
- run: |
grep -E "^[^/]+\.json$" "$CI_INFO_TEMP_DIR/pr_all_filenames.txt" | grep -v aqua-checksums.json | while read -r file; do
if [ -f "$file" ]; then
RENOVATE_CONFIG_FILE="$file" npx --package renovate -c renovate-config-validator
fi
done
ghalint:
# Validate GitHub Actions Workflows by ghalint.
timeout-minutes: 15
needs: path-filter
if: needs.path-filter.outputs.ghalint == 'true'
runs-on: ubuntu-latest
permissions: {}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- uses: aquaproj/aqua-installer@e2d0136abcf70b7a2f6f505720640750557c4b33 # v3.1.1
with:
aqua_version: v2.44.0
env:
AQUA_GITHUB_TOKEN: ${{github.token}}
- run: ghalint run
env:
GHALINT_LOG_COLOR: always