Skip to content

Commit 81db11f

Browse files
authored
chore(ci): pin deps in workflow and add dependabot to update them weekly (#66)
* pin to hashes * package read is not required * remove duplicate perm * pin to `master` and configure per https://github.com/dtolnay/rust-toolchain?tab=readme-ov-file#choice-of-full-length-commit-sha * fix
1 parent de3fd9d commit 81db11f

File tree

3 files changed

+33
-16
lines changed

3 files changed

+33
-16
lines changed

.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: "weekly"

.github/workflows/ci.yml

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ jobs:
3333
- uses: actions/checkout@v5
3434
with:
3535
persist-credentials: false
36-
- uses: dtolnay/rust-toolchain@stable
36+
- uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # master
3737
with:
3838
toolchain: ${{ matrix.rust }}
3939
# Only run tests on latest stable and above
4040
- name: Install cargo-nextest
4141
if: ${{ matrix.rust != '1.88' }} # MSRV
42-
uses: taiki-e/install-action@nextest
42+
uses: taiki-e/install-action@de179ea33fa5f5c434a81563f0e8a1c4f7ab8fe2 # nextest
4343
- name: build
4444
if: ${{ matrix.rust == '1.88' }} # MSRV
4545
run: cargo build --workspace ${{ matrix.flags }}
@@ -54,8 +54,10 @@ jobs:
5454
- uses: actions/checkout@v5
5555
with:
5656
persist-credentials: false
57-
- uses: dtolnay/rust-toolchain@stable
58-
- uses: Swatinem/rust-cache@v2
57+
- uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # master
58+
with:
59+
toolchain: stable
60+
- uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2
5961
with:
6062
cache-on-failure: true
6163
- run: cargo test --workspace --doc
@@ -68,9 +70,11 @@ jobs:
6870
- uses: actions/checkout@v5
6971
with:
7072
persist-credentials: false
71-
- uses: dtolnay/rust-toolchain@stable
72-
- uses: taiki-e/install-action@cargo-hack
73-
- uses: Swatinem/rust-cache@v2
73+
- uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # master
74+
with:
75+
toolchain: stable
76+
- uses: taiki-e/install-action@c9a06c0e5d38d182732372ae4390adb6ddbfd51b # cargo-hack
77+
- uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2
7478
with:
7579
cache-on-failure: true
7680
- name: cargo hack
@@ -83,8 +87,11 @@ jobs:
8387
- uses: actions/checkout@v5
8488
with:
8589
persist-credentials: false
86-
- uses: dtolnay/rust-toolchain@clippy
87-
- uses: Swatinem/rust-cache@v2
90+
- uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # master
91+
with:
92+
toolchain: nightly
93+
components: clippy
94+
- uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2
8895
with:
8996
cache-on-failure: true
9097
- run: cargo clippy --workspace --all-targets --all-features
@@ -98,8 +105,10 @@ jobs:
98105
- uses: actions/checkout@v5
99106
with:
100107
persist-credentials: false
101-
- uses: dtolnay/rust-toolchain@nightly
102-
- uses: Swatinem/rust-cache@v2
108+
- uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # master
109+
with:
110+
toolchain: nightly
111+
- uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2
103112
with:
104113
cache-on-failure: true
105114
- run: cargo doc --workspace --all-features --no-deps --document-private-items
@@ -113,13 +122,14 @@ jobs:
113122
- uses: actions/checkout@v5
114123
with:
115124
persist-credentials: false
116-
- uses: dtolnay/rust-toolchain@nightly
125+
- uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # master
117126
with:
127+
toolchain: nightly
118128
components: rustfmt
119129
- run: cargo fmt --all --check
120130

121131
deny:
122-
uses: ithacaxyz/ci/.github/workflows/deny.yml@main
132+
uses: ithacaxyz/ci/.github/workflows/deny.yml@9c8d0dc20e7ad02455d3fdab2378a05f29907630 # main
123133

124134
ci-success:
125135
runs-on: ubuntu-latest
@@ -136,6 +146,6 @@ jobs:
136146
timeout-minutes: 30
137147
steps:
138148
- name: Decide whether the needed jobs succeeded or failed
139-
uses: re-actors/alls-green@release/v1
149+
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # release/v1
140150
with:
141151
jobs: ${{ toJSON(needs) }}

.github/workflows/codeql.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: CodeQL
22

3+
permissions:
4+
contents: read
5+
36
on:
47
push:
58
branches: ["main"]
@@ -19,9 +22,7 @@ jobs:
1922
runs-on: ubuntu-latest
2023
permissions:
2124
security-events: write
22-
packages: read
2325
actions: read
24-
contents: read
2526

2627
strategy:
2728
fail-fast: false

0 commit comments

Comments
 (0)