Repository navigation
130 lines (115 loc) · 4.55 KB
/
Copy pathci.yaml
File metadata and controls
130 lines (115 loc) · 4.55 KB
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
name: Continuous Integration
permissions: read-all
on:
pull_request:
branches:
- main
- devs/**
concurrency:
# yamllint disable-line rule:line-length
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
linters:
timeout-minutes: 5
runs-on: ubuntu-26.04
steps:
- name: Checkout 🛎️
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
- name: Check workflow files
uses: docker://rhysd/actionlint:1.7.12@sha256:b1934ee5f1c509618f2508e6eb47ee0d3520686341fec936f3b79331f9315667
with:
args: -color
# yamllint and semgrep run from their published images (no host Python),
# matching the actionlint step above. Renovate manages the tags + digests.
- name: Lint YAML 🔍
uses: docker://cytopia/yamllint:1@sha256:596fb19eb71e55ba5b2fa56d8c18a615ec82adc8d3bf2d73918cb78c8f3240fb
with:
args: .
- name: Security scan 🔒
uses: docker://semgrep/semgrep:1.167.0@sha256:06938c1f365d3f67b8cedd8bc117607ae64253f88a0e768e9da9408548927dd6
with:
# Set the entrypoint explicitly: this image has no ENTRYPOINT, and
# pinning it keeps the step correct if a digest bump reintroduces one.
entrypoint: semgrep
# The short minimumReleaseAge in renovate.json is deliberate, and the
# rule's suggested opt-out ("minimumReleaseAge": false) is invalid
# per the Renovate schema, so the rule is excluded instead.
args: --config=auto --error --exclude-rule package_managers.renovate.renovate-missing-minimum-release-age.renovate-missing-minimum-release-age
autodoc:
timeout-minutes: 5
runs-on: ubuntu-26.04
steps:
- name: Checkout
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
- name: Regenerate documentation
run: ./generate-doc.sh
- name: Verify Changed files
run: |
if ! git diff --exit-code -- README.md; then
echo "::error::Action documentation is out of date. Run \`./generate-doc.sh\`"
exit 1
fi
test-install:
timeout-minutes: 5
# One runner per target triple install.sh supports, so every detection +
# extraction path is exercised: linux+macos on both x86_64 and aarch64.
# (Windows is added once install.sh ships a Windows path.)
strategy:
fail-fast: false
matrix:
os:
- ubuntu-26.04 # x86_64-unknown-linux-gnu
- ubuntu-26.04-arm # aarch64-unknown-linux-gnu
- macos-15-intel # x86_64-apple-darwin
- macos-15 # aarch64-apple-darwin
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- name: Checkout 🛎️
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
- name: Install pinned mergify-cli
id: pinned
uses: ./
with:
mergify_cli_version: 2026.11.8
- name: Assert pinned install
env:
VERSION: ${{ steps.pinned.outputs.mergify_cli_version }}
# Must equal the with: input above; Renovate bumps both on each
# mergify-cli release. Kept as a separate literal (not derived from
# the input) so the assertion checks against a fixed expectation. The
# name is mergify-specific so the Renovate customManager that bumps it
# cannot collide with any other digit-led env added here later.
EXPECTED_MERGIFY_CLI_VERSION: 2026.11.8
run: |
# Compare against the expected literal requested version (not the
# action's own readback), so a regression that installs the wrong
# version fails CI.
test "$VERSION" = "$EXPECTED_MERGIFY_CLI_VERSION"
test "$(mergify --version | awk '{print $NF}')" = "$EXPECTED_MERGIFY_CLI_VERSION"
- name: Install latest mergify-cli
id: latest
uses: ./
with:
mergify_cli_version: latest
- name: Assert latest install
env:
VERSION: ${{ steps.latest.outputs.mergify_cli_version }}
run: |
test -n "$VERSION"
test "$(mergify --version | awk '{print $NF}')" = "$VERSION"
all-greens:
if: ${{ !cancelled() }}
needs:
- linters
- autodoc
- test-install
runs-on: ubuntu-26.04
steps:
- name: Verify all jobs succeeded
uses: re-actors/alls-green@b5b5b37504aa4183270bd3d855c52a67f212be35 # release/v1
with:
jobs: ${{ toJSON(needs) }}