Skip to content

Commit 3590c67

Browse files
authored
Update GitHub Actions workflows (#157)
* Update workflow action versions * Pin workflow actions to commit SHAs * Add workflow step names * Add pinact workflow * Remove checksum steps from release workflow
1 parent 1869f3f commit 3590c67

5 files changed

Lines changed: 49 additions & 24 deletions

File tree

.github/workflows/build.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ jobs:
1717
outputs:
1818
msrv: ${{ steps.get-msrv.outputs.msrv }}
1919
steps:
20-
- uses: actions/checkout@v4
20+
- name: Checkout
21+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2122
- name: Get MSRV
2223
id: get-msrv
2324
run: |
@@ -32,12 +33,15 @@ jobs:
3233
- ${{ needs.prepare.outputs.msrv }}
3334
runs-on: ubuntu-latest
3435
steps:
35-
- uses: actions/checkout@v4
36-
- uses: dtolnay/rust-toolchain@master
36+
- name: Checkout
37+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
38+
- name: Setup Rust
39+
uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 # latest commit as of 2026-03-28
3740
with:
3841
toolchain: ${{ matrix.versions }}
3942
components: rustfmt, clippy
40-
- uses: Swatinem/rust-cache@v2
43+
- name: Cache
44+
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
4145
- name: Version
4246
run: |
4347
rustc --version
@@ -71,11 +75,11 @@ jobs:
7175
runs-on: ${{ matrix.targets.os }}
7276
steps:
7377
- name: Checkout
74-
uses: actions/checkout@v4
78+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
7579
- name: Setup
7680
run: rustup target add ${{ matrix.targets.target }}
7781
- name: Build
78-
uses: houseabsolute/actions-rust-cross@v1.0.0
82+
uses: houseabsolute/actions-rust-cross@a8cc74d61047fa553b4e908b4b10e70029f00ca6 # v1.0.6
7983
with:
8084
command: build
8185
target: ${{ matrix.targets.target }}

.github/workflows/deny.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ jobs:
2323
cargo-deny:
2424
runs-on: ubuntu-latest
2525
steps:
26-
# https://github.com/actions/checkout/releases/tag/v6.0.1
27-
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
28-
# https://github.com/EmbarkStudios/cargo-deny-action/releases/tag/v2.0.14
29-
- uses: EmbarkStudios/cargo-deny-action@76cd80eb775d7bbbd2d80292136d74d39e1b4918
26+
- name: Checkout
27+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
28+
- name: Check licenses
29+
uses: EmbarkStudios/cargo-deny-action@91bf2b620e09e18d6eb78b92e7861937469acedb # v2.0.17
3030
with:
3131
command: check licenses

.github/workflows/gh-pages.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ jobs:
2222
runs-on: ubuntu-latest
2323
steps:
2424
- name: Checkout
25-
uses: actions/checkout@v4
25+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2626
- name: Setup Pages
27-
uses: actions/configure-pages@v4
27+
uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0
2828
- name: Install mdbook
2929
working-directory: docs
3030
run: |
@@ -34,7 +34,7 @@ jobs:
3434
run: |
3535
./mdbook build
3636
- name: Upload artifact
37-
uses: actions/upload-pages-artifact@v3
37+
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
3838
with:
3939
path: docs/book
4040

@@ -47,5 +47,4 @@ jobs:
4747
steps:
4848
- name: Deploy to GitHub Pages
4949
id: deployment
50-
uses: actions/deploy-pages@v4
51-
50+
uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0

.github/workflows/pinact.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Pinact
2+
3+
on:
4+
push:
5+
branches:
6+
- '*'
7+
paths:
8+
- .github/**
9+
pull_request:
10+
branches:
11+
- master
12+
paths:
13+
- .github/**
14+
15+
jobs:
16+
pinact:
17+
runs-on: ubuntu-latest
18+
timeout-minutes: 5
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
22+
- name: Pinact
23+
uses: suzuki-shunsuke/pinact-action@cf51507d80d4d6522a07348e3d58790290eaf0b6 # v2.0.0
24+
with:
25+
skip_push: "true"
26+
verify: "true"

.github/workflows/release.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ jobs:
2828
runs-on: ${{ matrix.targets.os }}
2929
steps:
3030
- name: Checkout
31-
uses: actions/checkout@v4
31+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3232
- name: Setup
3333
run: rustup target add ${{ matrix.targets.target }}
3434
- name: Build
35-
uses: houseabsolute/actions-rust-cross@v1.0.0
35+
uses: houseabsolute/actions-rust-cross@a8cc74d61047fa553b4e908b4b10e70029f00ca6 # v1.0.6
3636
with:
3737
command: build
3838
target: ${{ matrix.targets.target }}
@@ -41,10 +41,8 @@ jobs:
4141
run: echo "RELEASE_VERSION=${GITHUB_REF_NAME#v}" >> ${GITHUB_ENV}
4242
- name: Archive
4343
run: tar -czf serie-${{ env.RELEASE_VERSION }}-${{ matrix.targets.target }}.tar.gz -C target/${{ matrix.targets.target }}/release serie
44-
- name: Checksum
45-
run: shasum -a 256 serie-${{ env.RELEASE_VERSION }}-${{ matrix.targets.target }}.tar.gz
4644
- name: Upload artifact
47-
uses: actions/upload-artifact@v4
45+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
4846
with:
4947
name: release-${{ matrix.targets.target }}
5048
path: serie-${{ env.RELEASE_VERSION }}-${{ matrix.targets.target }}.tar.gz
@@ -56,15 +54,13 @@ jobs:
5654
needs: build
5755
steps:
5856
- name: Download artifact
59-
uses: actions/download-artifact@v4
57+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
6058
with:
6159
path: releases
6260
pattern: release-*
6361
merge-multiple: true
64-
- name: Checksum
65-
run: sha256sum releases/* > ./releases/checksum.txt
6662
- name: Create Draft Release
67-
uses: softprops/action-gh-release@v2.0.4
63+
uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3.0.0
6864
with:
6965
draft: true
7066
generate_release_notes: true

0 commit comments

Comments
 (0)