Skip to content

Commit 5876016

Browse files
authored
ci: pin all actions (#250)
* ci: pin all actions * chore: bump cargo dist and pin release.yml actions
1 parent 65ab92e commit 5876016

6 files changed

Lines changed: 43 additions & 34 deletions

File tree

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: daily

.github/workflows/ci.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,28 @@ jobs:
99
lint:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v3
12+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
1313
with:
1414
submodules: true
15-
- uses: moonrepo/setup-rust@v1
15+
- uses: moonrepo/setup-rust@ede6de059f8046a5e236c94046823e2af11ca670 # v1
1616
with:
1717
components: rustfmt, clippy
18-
- uses: pre-commit/action@v3.0.1
18+
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
1919
with:
2020
extra_args: --all-files
2121

2222
tests:
2323
runs-on: ubuntu-latest
2424
steps:
25-
- uses: actions/checkout@v3
25+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
2626
with:
2727
lfs: true
2828
submodules: true
2929

3030
- name: "Install rust-toolchain.toml"
3131
run: rustup toolchain install
3232
# We use Swatinem/rust-cache to cache cargo registry, index and target in this job
33-
- uses: Swatinem/rust-cache@v2
33+
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
3434

3535
# Install memtrack for the memory integration tests
3636
- name: Install dependencies required for libbpf-sys (vendored feature)
@@ -47,21 +47,21 @@ jobs:
4747
exec-harness-tests:
4848
runs-on: ubuntu-latest
4949
steps:
50-
- uses: actions/checkout@v3
50+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
5151
with:
5252
submodules: true
53-
- uses: moonrepo/setup-rust@v1
53+
- uses: moonrepo/setup-rust@ede6de059f8046a5e236c94046823e2af11ca670 # v1
5454
- name: Run tests
5555
run: cargo test -p exec-harness
5656

5757
bpf-tests:
5858
runs-on: ubuntu-latest
5959
steps:
60-
- uses: actions/checkout@v3
60+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
6161
with:
6262
lfs: true
6363
submodules: true
64-
- uses: moonrepo/setup-rust@v1
64+
- uses: moonrepo/setup-rust@ede6de059f8046a5e236c94046823e2af11ca670 # v1
6565
- name: Install dependencies required for libbpf-sys (vendored feature)
6666
run: sudo apt-get update && sudo apt-get install -y autopoint bison flex
6767

@@ -81,22 +81,22 @@ jobs:
8181
benchmarks:
8282
runs-on: ubuntu-latest
8383
steps:
84-
- uses: actions/checkout@v3
84+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
8585
with:
8686
submodules: true
8787

8888
- name: "Install rust-toolchain.toml"
8989
run: rustup toolchain install
90-
- uses: Swatinem/rust-cache@v2
90+
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
9191
- name: Install cargo codspeed
92-
uses: taiki-e/install-action@v2
92+
uses: taiki-e/install-action@f92912fad184299a31e22ad070a5059fd07d4f59 # v2
9393
with:
9494
tool: cargo-codspeed
9595

9696
- name: Build benchmarks
9797
run: cargo codspeed build -p runner-shared
9898
- name: Run benchmarks
99-
uses: CodSpeedHQ/action@v4
99+
uses: CodSpeedHQ/action@4deb3275dd364fb96fb074c953133d29ec96f80f # v4
100100
with:
101101
mode: simulation
102102
run: cargo codspeed run -p runner-shared

.github/workflows/create-draft-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
run: |
1919
echo "Plan details: $PLAN"
2020
21-
- uses: actions/checkout@v4
21+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
2222

2323
- name: Create draft release
2424
run: |

.github/workflows/release.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,17 @@ jobs:
5656
env:
5757
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5858
steps:
59-
- uses: actions/checkout@v4
59+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
6060
with:
6161
persist-credentials: false
6262
submodules: recursive
6363
- name: Install dist
6464
# we specify bash to get pipefail; it guards against the `curl` command
6565
# failing. otherwise `sh` won't catch that `curl` returned non-0
6666
shell: bash
67-
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.30.3/cargo-dist-installer.sh | sh"
67+
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.31.0/cargo-dist-installer.sh | sh"
6868
- name: Cache dist
69-
uses: actions/upload-artifact@v4
69+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f
7070
with:
7171
name: cargo-dist-cache
7272
path: ~/.cargo/bin/dist
@@ -82,7 +82,7 @@ jobs:
8282
cat plan-dist-manifest.json
8383
echo "manifest=$(jq -c "." plan-dist-manifest.json)" >> "$GITHUB_OUTPUT"
8484
- name: "Upload dist-manifest.json"
85-
uses: actions/upload-artifact@v4
85+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f
8686
with:
8787
name: artifacts-plan-dist-manifest
8888
path: plan-dist-manifest.json
@@ -116,7 +116,7 @@ jobs:
116116
- name: enable windows longpaths
117117
run: |
118118
git config --global core.longpaths true
119-
- uses: actions/checkout@v4
119+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
120120
with:
121121
persist-credentials: false
122122
submodules: recursive
@@ -131,7 +131,7 @@ jobs:
131131
run: ${{ matrix.install_dist.run }}
132132
# Get the dist-manifest
133133
- name: Fetch local artifacts
134-
uses: actions/download-artifact@v4
134+
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131
135135
with:
136136
pattern: artifacts-*
137137
path: target/distrib/
@@ -158,7 +158,7 @@ jobs:
158158
159159
cp dist-manifest.json "$BUILD_MANIFEST_NAME"
160160
- name: "Upload artifacts"
161-
uses: actions/upload-artifact@v4
161+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f
162162
with:
163163
name: artifacts-build-local-${{ join(matrix.targets, '_') }}
164164
path: |
@@ -185,19 +185,19 @@ jobs:
185185
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
186186
BUILD_MANIFEST_NAME: target/distrib/global-dist-manifest.json
187187
steps:
188-
- uses: actions/checkout@v4
188+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
189189
with:
190190
persist-credentials: false
191191
submodules: recursive
192192
- name: Install cached dist
193-
uses: actions/download-artifact@v4
193+
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131
194194
with:
195195
name: cargo-dist-cache
196196
path: ~/.cargo/bin/
197197
- run: chmod +x ~/.cargo/bin/dist
198198
# Get all the local artifacts for the global tasks to use (for e.g. checksums)
199199
- name: Fetch local artifacts
200-
uses: actions/download-artifact@v4
200+
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131
201201
with:
202202
pattern: artifacts-*
203203
path: target/distrib/
@@ -215,7 +215,7 @@ jobs:
215215
216216
cp dist-manifest.json "$BUILD_MANIFEST_NAME"
217217
- name: "Upload artifacts"
218-
uses: actions/upload-artifact@v4
218+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f
219219
with:
220220
name: artifacts-build-global
221221
path: |
@@ -236,19 +236,19 @@ jobs:
236236
outputs:
237237
val: ${{ steps.host.outputs.manifest }}
238238
steps:
239-
- uses: actions/checkout@v4
239+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
240240
with:
241241
persist-credentials: false
242242
submodules: recursive
243243
- name: Install cached dist
244-
uses: actions/download-artifact@v4
244+
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131
245245
with:
246246
name: cargo-dist-cache
247247
path: ~/.cargo/bin/
248248
- run: chmod +x ~/.cargo/bin/dist
249249
# Fetch artifacts from scratch-storage
250250
- name: Fetch artifacts
251-
uses: actions/download-artifact@v4
251+
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131
252252
with:
253253
pattern: artifacts-*
254254
path: target/distrib/
@@ -261,14 +261,14 @@ jobs:
261261
cat dist-manifest.json
262262
echo "manifest=$(jq -c "." dist-manifest.json)" >> "$GITHUB_OUTPUT"
263263
- name: "Upload dist-manifest.json"
264-
uses: actions/upload-artifact@v4
264+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f
265265
with:
266266
# Overwrite the previous copy
267267
name: artifacts-dist-manifest
268268
path: dist-manifest.json
269269
# Create a GitHub Release while uploading all files to it
270270
- name: "Download GitHub Artifacts"
271-
uses: actions/download-artifact@v4
271+
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131
272272
with:
273273
pattern: artifacts-*
274274
path: artifacts
@@ -311,7 +311,7 @@ jobs:
311311
env:
312312
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
313313
steps:
314-
- uses: actions/checkout@v4
314+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
315315
with:
316316
persist-credentials: false
317317
submodules: recursive

crates/memtrack/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ insta = { version = "1.46.1", default-features = false }
4848
test-with = "0.14"
4949

5050
[package.metadata.dist]
51-
dist = true
52-
installers = ["shell"]
5351
targets = ["aarch64-unknown-linux-gnu", "x86_64-unknown-linux-gnu"]
5452
features = ["libbpf-rs/static"]
5553

dist-workspace.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ members = ["cargo:."]
66
# Whether to consider the binaries in a package for distribution (defaults true)
77
dist = true
88
# The preferred dist version to use in CI (Cargo.toml SemVer syntax)
9-
cargo-dist-version = "0.30.3"
9+
cargo-dist-version = "0.31.0"
1010
# CI backends to support
1111
ci = "github"
1212
# The installers to generate for each app
@@ -33,5 +33,10 @@ local-artifacts-jobs = ["./create-draft-release"]
3333
# https://github.com/axodotdev/cargo-dist/issues/2244
3434
allow-dirty = ["ci"]
3535

36+
[dist.github-action-commits]
37+
"actions/checkout" = "de0fac2e4500dabe0009e67214ff5f5447ce83dd" # v6.0.2
38+
"actions/upload-artifact" = "b7c566a772e6b6bfb58ed0dc250532a479d7789f" # v6.0.0
39+
"actions/download-artifact" = "37930b1c2abaa49bbe596cd826c3c89aef350131" # v7.0.0
40+
3641
[dist.github-custom-runners]
3742
aarch64-unknown-linux-musl = "codspeedhq-arm64-ubuntu-24.04"

0 commit comments

Comments
 (0)