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)
  • Loading branch information
brycx authored Jan 19, 2025
1 parent 865c7c0 commit fbebac0
Show file tree
Hide file tree
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

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/daily_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/lints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 }}
Expand All @@ -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

Expand All @@ -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.