1010 PLATFORMS : linux/amd64,linux/arm64
1111
1212jobs :
13- style :
13+ lint :
1414 runs-on : ubuntu-latest
1515 steps :
16- - name : checkout all PR branch and commits
17- uses : actions/checkout@v5
18- with :
19- ref : ${{ github.event.pull_request.head.sha }}
20- fetch-depth : ${{ github.event.pull_request.commits }}
21-
22- - name : setup go
23- uses : actions/setup-go@v6
24- with :
25- go-version : " 1.25.x"
26- cache : false
27-
28- - name : validate conventional commit prefix
29- working-directory : scripts
30- run : ./validate-conventional-commit-prefix.sh
31-
32- - name : golangci-lint
33- uses : golangci/golangci-lint-action@v8
34- with :
35- args : --timeout=5m --color=always --max-same-issues=0 --max-issues-per-linter=0
36-
37- - name : setup regal
38- uses : StyraInc/setup-regal@v1
39- with :
40- version : v0.30
41-
42- - name : lint examples - warnings
43- continue-on-error : true # Regal returns non-zero even with fail-level set to warning.
44- run : >-
45- regal lint
46- examples
47- --disable directory-package-mismatch
48- --disable unresolved-import
49- --format github
50-
51- - name : lint examples - blocking
52- run : >-
53- regal lint
54- examples
55- --disable-all
56- --enable-category bugs
57- --format github
16+ - name : checkout all PR branch and commits
17+ uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # ratchet:actions/checkout@v5
18+ with :
19+ ref : ${{ github.event.pull_request.head.sha }}
20+ fetch-depth : ${{ github.event.pull_request.commits }}
21+
22+ - name : setup go
23+ uses : actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # ratchet:actions/setup-go@v6
24+ with :
25+ go-version : " 1.25.x"
26+ cache : false
27+
28+ - name : validate conventional commit prefix
29+ working-directory : scripts
30+ run : ./validate-conventional-commit-prefix.sh
31+
32+ - name : golangci-lint
33+ uses : golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # ratchet:golangci/golangci-lint-action@v8
34+ with :
35+ args : --timeout=5m --color=always --max-same-issues=0 --max-issues-per-linter=0
36+
37+ - name : setup regal
38+ uses : StyraInc/setup-regal@33a142b1189004e0f14bf42b15972c67eecce776 # ratchet:StyraInc/setup-regal@v1
39+ with :
40+ version : v0.30
41+
42+ - name : lint examples - warnings
43+ continue-on-error : true # Regal returns non-zero even with fail-level set to warning.
44+ run : >-
45+ regal lint
46+ examples
47+ --disable directory-package-mismatch
48+ --disable unresolved-import
49+ --format github
50+
51+ - name : lint examples - blocking
52+ run : >-
53+ regal lint
54+ examples
55+ --disable-all
56+ --enable-category bugs
57+ --format github
58+
59+ - name : ratchet
60+ uses : sethvargo/ratchet@main
61+ with :
62+ files : .github/workflows
5863
5964 validate :
6065 strategy :
@@ -66,10 +71,10 @@ jobs:
6671 runs-on : ${{ matrix.os }}
6772 steps :
6873 - name : checkout source
69- uses : actions/checkout@v5
74+ uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # ratchet:actions/checkout@ v5
7075
7176 - name : setup go
72- uses : actions/setup-go@v6
77+ uses : actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # ratchet:actions/setup-go@ v6
7378 with :
7479 go-version : " 1.25.x"
7580 cache : false
@@ -83,13 +88,13 @@ jobs:
8388 # Ensure Actions runner has Python installed
8489 # This is required for pre-commit tests to work
8590 - name : setup python
86- uses : actions/setup-python@v6
91+ uses : actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # ratchet:actions/setup-python@ v6
8792 with :
8893 python-version : ' 3.13'
8994 cache : ' pip'
9095
9196 - name : setup bats
92- 97+ uses : bats-core/bats-action@42fcc8700f773c075a16a90eb11674c0318ad507 # ratchet:bats-core/bats-action@ 3.0.1
9398 with :
9499 # Pin bats version to fix CI issue: https://github.com/bats-core/bats-action/pull/4
95100 bats-version : " 1.10.0"
@@ -129,13 +134,13 @@ jobs:
129134 - validate
130135 steps :
131136 - name : checkout source
132- uses : actions/checkout@v5
137+ uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # ratchet:actions/checkout@ v5
133138
134139 - name : setup docker buildx
135140 run : docker buildx create --name conftestbuild --use
136141
137142 - name : Build Docker image
138- uses : docker/build-push-action@v6
143+ uses : docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # ratchet:docker/build-push-action@v6
139144 with :
140145 context : .
141146 push : false
@@ -152,13 +157,13 @@ jobs:
152157 - validate
153158 steps :
154159 - name : checkout source
155- uses : actions/checkout@v5
160+ uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # ratchet:actions/checkout@ v5
156161
157162 - name : setup docker buildx
158163 run : docker buildx create --name conftestbuild --use
159164
160165 - name : Build Docker image
161- uses : docker/build-push-action@v6
166+ uses : docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # ratchet:docker/build-push-action@v6
162167 with :
163168 context : .
164169 target : examples
0 commit comments