Skip to content

Commit 88f685a

Browse files
ci: pin GitHub Actions and enable updates (#26)
* ci: pin GitHub Actions and enable updates Group weekly action-SHA bumps into a single PR and bump crazy-max/ghaction-github-labeler and Swatinem/rust-cache to their latest pinned SHAs. --------- Co-authored-by: Farhan Syah <bizimpulse@gmail.com>
1 parent c9aa941 commit 88f685a

6 files changed

Lines changed: 72 additions & 41 deletions

File tree

.github/dependabot.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
version: 2
2+
updates:
3+
# Workflows pin every third-party action to a commit SHA, which is immutable
4+
# but goes stale silently. Dependabot is the update owner that makes pinning
5+
# sustainable: it reads the `# vX.Y.Z` annotation beside each SHA and opens a
6+
# PR moving both when a newer release ships.
7+
#
8+
# `dtolnay/rust-toolchain` is the exception and is maintained by hand. It
9+
# publishes no version series — the workflows pin `refs/heads/stable`, whose
10+
# `action.yml` defaults `toolchain: stable` and lets rustup resolve the
11+
# current release at run time. Its only tag, `v1`, makes `toolchain` a
12+
# required input, so switching to it would break every call site that relies
13+
# on that default. Dependabot cannot track a branch pin, so bumping that SHA
14+
# is a manual step.
15+
- package-ecosystem: "github-actions"
16+
directory: "/"
17+
schedule:
18+
interval: "weekly"
19+
# One PR per week for all action bumps, not one per action. Each PR costs a
20+
# full matrix run, and a queue of near-identical PRs is the fastest way to
21+
# turn review into rubber-stamping.
22+
groups:
23+
actions:
24+
patterns:
25+
- "*"
26+
# `default-days` is the only cooldown key GitHub Actions supports; the
27+
# `semver-*-days` variants are ignored for this ecosystem. Seven days keeps
28+
# freshly published releases out of the queue without delaying security
29+
# updates, which cooldown never applies to.
30+
cooldown:
31+
default-days: 7

.github/workflows/labels.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ jobs:
1414
sync:
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@v7
18-
- uses: crazy-max/ghaction-github-labeler@v5
17+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
18+
- uses: crazy-max/ghaction-github-labeler@548a7c3603594ec17c819e1239f281a3b801ab4d # v6.0.0
1919
with:
2020
yaml-file: .github/labels.yml
2121
skip-delete: true

.github/workflows/release-prepare.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,14 @@ jobs:
7272
label: windows-x64
7373
ext: ".exe"
7474
steps:
75-
- uses: actions/checkout@v7
75+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
7676

7777
- name: Install Rust + target
78-
uses: dtolnay/rust-toolchain@stable
78+
uses: dtolnay/rust-toolchain@4cda84d5c5c54efe2404f9d843567869ab1699d4 # stable
7979
with:
8080
targets: ${{ matrix.target }}
8181

82-
- uses: Swatinem/rust-cache@v2
82+
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
8383
with:
8484
prefix-key: fsck-${{ matrix.target }}
8585

@@ -106,7 +106,7 @@ jobs:
106106
$name = "pagedb-fsck-${{ needs.validate-version.outputs.version }}-${{ matrix.label }}.zip"
107107
Compress-Archive -Path "pagedb-fsck${{ matrix.ext }}" -DestinationPath $name
108108
109-
- uses: actions/upload-artifact@v7
109+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
110110
with:
111111
name: fsck-${{ matrix.label }}
112112
path: |

.github/workflows/release-validate.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ jobs:
3030
version: ${{ steps.version.outputs.version }}
3131
is_full_release: ${{ steps.version.outputs.is_full_release }}
3232
steps:
33-
- uses: actions/checkout@v7
33+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
3434
with:
3535
ref: ${{ inputs.ref }}
3636

3737
- name: Install Rust
38-
uses: dtolnay/rust-toolchain@stable
38+
uses: dtolnay/rust-toolchain@4cda84d5c5c54efe2404f9d843567869ab1699d4 # stable
3939

4040
- name: Validate tag against Cargo.toml
4141
id: version

.github/workflows/release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,12 @@ jobs:
6868
runs-on: ubuntu-latest
6969
environment: crates.io
7070
steps:
71-
- uses: actions/checkout@v7
71+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
7272
with:
7373
ref: ${{ inputs.tag }}
7474

7575
- name: Install Rust
76-
uses: dtolnay/rust-toolchain@stable
76+
uses: dtolnay/rust-toolchain@4cda84d5c5c54efe2404f9d843567869ab1699d4 # stable
7777

7878
# The verifying publish compiles the packaged lib + the pagedb-fsck bin
7979
# against crates.io deps. The io-uring VFS backend needs nothing extra,
@@ -121,7 +121,7 @@ jobs:
121121
contents: write
122122
actions: read
123123
steps:
124-
- uses: actions/checkout@v7
124+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
125125
with:
126126
ref: ${{ inputs.tag }}
127127
fetch-depth: 0
@@ -148,7 +148,7 @@ jobs:
148148
"$(git rev-parse HEAD)"
149149
150150
- name: Download fsck artifacts
151-
uses: actions/download-artifact@v8
151+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
152152
with:
153153
pattern: "fsck-*"
154154
run-id: ${{ inputs.prepare_run_id }}
@@ -164,7 +164,7 @@ jobs:
164164
bash scripts/ci/verify_release_artifacts.sh ./artifacts "$VERSION"
165165
166166
- name: Create GitHub Release
167-
uses: softprops/action-gh-release@v3
167+
uses: softprops/action-gh-release@3d0d9888cb7fd7b750713d6e236d1fcb99157228 # v3.0.2
168168
with:
169169
tag_name: ${{ inputs.tag }}
170170
name: pagedb ${{ needs.validate-version.outputs.version }}

.github/workflows/test.yml

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ jobs:
4343
name: Lint, Format & Docs
4444
runs-on: ubuntu-latest
4545
steps:
46-
- uses: actions/checkout@v7
46+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
4747

4848
- name: Install Rust
49-
uses: dtolnay/rust-toolchain@stable
49+
uses: dtolnay/rust-toolchain@4cda84d5c5c54efe2404f9d843567869ab1699d4 # stable
5050
with:
5151
components: rustfmt, clippy
5252

@@ -55,7 +55,7 @@ jobs:
5555
- name: Install LLVM/Clang
5656
run: sudo apt-get update && sudo apt-get install -y clang libclang-dev
5757

58-
- uses: Swatinem/rust-cache@v2
58+
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
5959
with:
6060
prefix-key: lint
6161

@@ -117,17 +117,17 @@ jobs:
117117
matrix:
118118
os: [ubuntu-latest, macos-latest, windows-latest]
119119
steps:
120-
- uses: actions/checkout@v7
120+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
121121

122122
- name: Install Rust
123-
uses: dtolnay/rust-toolchain@stable
123+
uses: dtolnay/rust-toolchain@4cda84d5c5c54efe2404f9d843567869ab1699d4 # stable
124124

125-
- uses: Swatinem/rust-cache@v2
125+
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
126126
with:
127127
prefix-key: test-${{ matrix.os }}
128128

129129
- name: Install cargo-nextest
130-
uses: taiki-e/install-action@v2
130+
uses: taiki-e/install-action@41049aa56687c35e0afa74eed4f09cec4f9afabf # v2.85.2
131131
with:
132132
tool: nextest
133133

@@ -138,7 +138,7 @@ jobs:
138138

139139
- name: Upload nextest report
140140
if: always()
141-
uses: actions/upload-artifact@v7
141+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
142142
with:
143143
name: nextest-${{ matrix.os }}
144144
path: target/nextest/default/junit.xml
@@ -163,17 +163,17 @@ jobs:
163163
# Only presence is checked, never the value.
164164
PAGEDB_INVARIANT_CHECKS: "1"
165165
steps:
166-
- uses: actions/checkout@v7
166+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
167167

168168
- name: Install Rust
169-
uses: dtolnay/rust-toolchain@stable
169+
uses: dtolnay/rust-toolchain@4cda84d5c5c54efe2404f9d843567869ab1699d4 # stable
170170

171-
- uses: Swatinem/rust-cache@v2
171+
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
172172
with:
173173
prefix-key: invariants
174174

175175
- name: Install cargo-nextest
176-
uses: taiki-e/install-action@v2
176+
uses: taiki-e/install-action@41049aa56687c35e0afa74eed4f09cec4f9afabf # v2.85.2
177177
with:
178178
tool: nextest
179179

@@ -182,7 +182,7 @@ jobs:
182182

183183
- name: Upload nextest report
184184
if: always()
185-
uses: actions/upload-artifact@v7
185+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
186186
with:
187187
name: nextest-invariants
188188
path: target/nextest/default/junit.xml
@@ -214,14 +214,14 @@ jobs:
214214
- target: armv7-linux-androideabi
215215
label: android-armv7 (AndroidVfs / thread-pool)
216216
steps:
217-
- uses: actions/checkout@v7
217+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
218218

219219
- name: Install Rust + target
220-
uses: dtolnay/rust-toolchain@stable
220+
uses: dtolnay/rust-toolchain@4cda84d5c5c54efe2404f9d843567869ab1699d4 # stable
221221
with:
222222
targets: ${{ matrix.target }}
223223

224-
- uses: Swatinem/rust-cache@v2
224+
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
225225
with:
226226
prefix-key: cross-${{ matrix.target }}
227227

@@ -243,14 +243,14 @@ jobs:
243243
features: ""
244244
label: wasi (WasiVfs)
245245
steps:
246-
- uses: actions/checkout@v7
246+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
247247

248248
- name: Install Rust + target
249-
uses: dtolnay/rust-toolchain@stable
249+
uses: dtolnay/rust-toolchain@4cda84d5c5c54efe2404f9d843567869ab1699d4 # stable
250250
with:
251251
targets: ${{ matrix.target }}
252252

253-
- uses: Swatinem/rust-cache@v2
253+
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
254254
with:
255255
prefix-key: wasm-${{ matrix.target }}
256256

@@ -270,12 +270,12 @@ jobs:
270270
- "--features compression"
271271
- "--all-features"
272272
steps:
273-
- uses: actions/checkout@v7
273+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
274274

275275
- name: Install Rust
276-
uses: dtolnay/rust-toolchain@stable
276+
uses: dtolnay/rust-toolchain@4cda84d5c5c54efe2404f9d843567869ab1699d4 # stable
277277

278-
- uses: Swatinem/rust-cache@v2
278+
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
279279
with:
280280
prefix-key: features
281281

@@ -287,17 +287,17 @@ jobs:
287287
name: Benchmark (dry run)
288288
runs-on: ubuntu-latest
289289
steps:
290-
- uses: actions/checkout@v7
290+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
291291

292292
- name: Install Rust
293-
uses: dtolnay/rust-toolchain@stable
293+
uses: dtolnay/rust-toolchain@4cda84d5c5c54efe2404f9d843567869ab1699d4 # stable
294294

295295
# The isolated comparison package links RocksDB (librocksdb-sys), whose
296296
# build runs bindgen and needs libclang.
297297
- name: Install LLVM/Clang
298298
run: sudo apt-get update && sudo apt-get install -y clang libclang-dev
299299

300-
- uses: Swatinem/rust-cache@v2
300+
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
301301
with:
302302
prefix-key: bench
303303

@@ -317,11 +317,11 @@ jobs:
317317
name: Dependency audit
318318
runs-on: ubuntu-latest
319319
steps:
320-
- uses: actions/checkout@v7
320+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
321321
- name: Install Rust
322-
uses: dtolnay/rust-toolchain@stable
322+
uses: dtolnay/rust-toolchain@4cda84d5c5c54efe2404f9d843567869ab1699d4 # stable
323323
- name: Install cargo-deny
324-
uses: taiki-e/install-action@v2
324+
uses: taiki-e/install-action@41049aa56687c35e0afa74eed4f09cec4f9afabf # v2.85.2
325325
with:
326326
tool: cargo-deny
327327
- name: Run cargo-deny

0 commit comments

Comments
 (0)