Skip to content

Commit

Permalink
CI: Harden GH Actions (#421)
Browse files Browse the repository at this point in the history
* ci: Reference rust-toolchain action by master-branch commit hash

* ci: Remove issue write permissions from cargo-deny (don't believe it actually was ever used)
brycx authored Jan 19, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 865c7c0 commit fbebac0
Showing 4 changed files with 13 additions and 7 deletions.
1 change: 1 addition & 0 deletions .github/workflows/audit_check.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: cargo deny (licenses, advisories, sources)

permissions:
contents: read

2 changes: 1 addition & 1 deletion .github/workflows/daily_tests.yml
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ jobs:
persist-credentials: false

- name: Install toolchain
uses: dtolnay/rust-toolchain@master
uses: dtolnay/rust-toolchain@a54c7afa936fefeb4456b2dd8068152669aa8203
with:
toolchain: ${{ matrix.toolchain }}

3 changes: 2 additions & 1 deletion .github/workflows/lints.yml
Original file line number Diff line number Diff line change
@@ -15,8 +15,9 @@ jobs:
persist-credentials: false

- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@a54c7afa936fefeb4456b2dd8068152669aa8203
with:
toolchain: stable
components: rustfmt, clippy

- name: Run cargo fmt
14 changes: 9 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -35,7 +35,7 @@ jobs:
persist-credentials: false

- name: Install toolchain
uses: dtolnay/rust-toolchain@master
uses: dtolnay/rust-toolchain@a54c7afa936fefeb4456b2dd8068152669aa8203
with:
toolchain: ${{ matrix.toolchain }}

@@ -73,7 +73,7 @@ jobs:
persist-credentials: false

- name: Install toolchain
uses: dtolnay/rust-toolchain@master
uses: dtolnay/rust-toolchain@a54c7afa936fefeb4456b2dd8068152669aa8203
with:
toolchain: nightly
targets: x86_64-unknown-linux-gnu
@@ -135,7 +135,7 @@ jobs:
with:
persist-credentials: false

- uses: dtolnay/rust-toolchain@master
- uses: dtolnay/rust-toolchain@a54c7afa936fefeb4456b2dd8068152669aa8203
with:
toolchain: stable
targets: ${{ matrix.arch }}
@@ -150,7 +150,9 @@ jobs:
with:
persist-credentials: false

- uses: dtolnay/rust-toolchain@stable
- uses: dtolnay/rust-toolchain@a54c7afa936fefeb4456b2dd8068152669aa8203
with:
toolchain: stable

- run: cargo doc --no-deps --all-features

@@ -162,6 +164,8 @@ jobs:
with:
persist-credentials: false

- uses: dtolnay/rust-toolchain@stable
- uses: dtolnay/rust-toolchain@a54c7afa936fefeb4456b2dd8068152669aa8203
with:
toolchain: stable

- run: cargo test --benches

0 comments on commit fbebac0

Please sign in to comment.