Skip to content

Commit ea10262

Browse files
committed
Improve Dependabot exclusion condition
1 parent 7225369 commit ea10262

File tree

10 files changed

+35
-34
lines changed

10 files changed

+35
-34
lines changed

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
# toolchain: ${{ steps.minimal-version.outputs.msrv }}
5555

5656
- name: Activate cache
57-
if: github.actor != 'dependabot[bot]'
57+
if: "!startsWith(github.head_ref, 'dependabot/')"
5858
uses: Swatinem/rust-cache@v2
5959

6060
- name: Build crate
@@ -78,7 +78,7 @@ jobs:
7878
components: llvm-tools
7979

8080
- name: Activate cache
81-
if: github.actor != 'dependabot[bot]'
81+
if: "!startsWith(github.head_ref, 'dependabot/')"
8282
uses: Swatinem/rust-cache@v2
8383

8484
- name: Install cargo-llvm-cov
@@ -108,7 +108,7 @@ jobs:
108108
components: clippy, rustfmt
109109

110110
- name: Activate cache
111-
if: github.actor != 'dependabot[bot]'
111+
if: "!startsWith(github.head_ref, 'dependabot/')"
112112
uses: Swatinem/rust-cache@v2
113113

114114
- name: Check code

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ v0.3.0 (in development)
33
- Switch from nom to winnow
44
- `release`: Take name of repository's default branch into account when adding
55
changelog link to README
6+
- `test.yml` template: Improve Dependabot exclusion condition
67

78
v0.2.0 (2023-11-22)
89
-------------------

src/templates/.github/workflows/test.yml.tt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
toolchain: $\{\{ steps.minimal-version.outputs.msrv }}
5555

5656
- name: Activate cache
57-
if: github.actor != 'dependabot[bot]'
57+
if: "!startsWith(github.head_ref, 'dependabot/')"
5858
uses: Swatinem/rust-cache@v2
5959

6060
- name: Build crate
@@ -78,7 +78,7 @@ jobs:
7878
components: llvm-tools
7979

8080
- name: Activate cache
81-
if: github.actor != 'dependabot[bot]'
81+
if: "!startsWith(github.head_ref, 'dependabot/')"
8282
uses: Swatinem/rust-cache@v2
8383

8484
- name: Install cargo-llvm-cov
@@ -108,7 +108,7 @@ jobs:
108108
components: clippy, rustfmt
109109

110110
- name: Activate cache
111-
if: github.actor != 'dependabot[bot]'
111+
if: "!startsWith(github.head_ref, 'dependabot/')"
112112
uses: Swatinem/rust-cache@v2
113113

114114
- name: Check code
@@ -129,7 +129,7 @@ jobs:
129129
toolchain: nightly
130130

131131
- name: Activate cache
132-
if: github.actor != 'dependabot[bot]'
132+
if: "!startsWith(github.head_ref, 'dependabot/')"
133133
uses: Swatinem/rust-cache@v2
134134

135135
- name: Check docs

tests/data/new/bin-lib/.github/workflows/test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
toolchain: ${{ steps.minimal-version.outputs.msrv }}
5555

5656
- name: Activate cache
57-
if: github.actor != 'dependabot[bot]'
57+
if: "!startsWith(github.head_ref, 'dependabot/')"
5858
uses: Swatinem/rust-cache@v2
5959

6060
- name: Build crate
@@ -78,7 +78,7 @@ jobs:
7878
components: llvm-tools
7979

8080
- name: Activate cache
81-
if: github.actor != 'dependabot[bot]'
81+
if: "!startsWith(github.head_ref, 'dependabot/')"
8282
uses: Swatinem/rust-cache@v2
8383

8484
- name: Install cargo-llvm-cov
@@ -108,7 +108,7 @@ jobs:
108108
components: clippy, rustfmt
109109

110110
- name: Activate cache
111-
if: github.actor != 'dependabot[bot]'
111+
if: "!startsWith(github.head_ref, 'dependabot/')"
112112
uses: Swatinem/rust-cache@v2
113113

114114
- name: Check code
@@ -129,7 +129,7 @@ jobs:
129129
toolchain: nightly
130130

131131
- name: Activate cache
132-
if: github.actor != 'dependabot[bot]'
132+
if: "!startsWith(github.head_ref, 'dependabot/')"
133133
uses: Swatinem/rust-cache@v2
134134

135135
- name: Check docs

tests/data/new/bin/.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
toolchain: ${{ steps.minimal-version.outputs.msrv }}
5555

5656
- name: Activate cache
57-
if: github.actor != 'dependabot[bot]'
57+
if: "!startsWith(github.head_ref, 'dependabot/')"
5858
uses: Swatinem/rust-cache@v2
5959

6060
- name: Build crate
@@ -78,7 +78,7 @@ jobs:
7878
components: llvm-tools
7979

8080
- name: Activate cache
81-
if: github.actor != 'dependabot[bot]'
81+
if: "!startsWith(github.head_ref, 'dependabot/')"
8282
uses: Swatinem/rust-cache@v2
8383

8484
- name: Install cargo-llvm-cov
@@ -108,7 +108,7 @@ jobs:
108108
components: clippy, rustfmt
109109

110110
- name: Activate cache
111-
if: github.actor != 'dependabot[bot]'
111+
if: "!startsWith(github.head_ref, 'dependabot/')"
112112
uses: Swatinem/rust-cache@v2
113113

114114
- name: Check code

tests/data/new/custom-project-name/.github/workflows/test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
toolchain: ${{ steps.minimal-version.outputs.msrv }}
5555

5656
- name: Activate cache
57-
if: github.actor != 'dependabot[bot]'
57+
if: "!startsWith(github.head_ref, 'dependabot/')"
5858
uses: Swatinem/rust-cache@v2
5959

6060
- name: Build crate
@@ -78,7 +78,7 @@ jobs:
7878
components: llvm-tools
7979

8080
- name: Activate cache
81-
if: github.actor != 'dependabot[bot]'
81+
if: "!startsWith(github.head_ref, 'dependabot/')"
8282
uses: Swatinem/rust-cache@v2
8383

8484
- name: Install cargo-llvm-cov
@@ -108,7 +108,7 @@ jobs:
108108
components: clippy, rustfmt
109109

110110
- name: Activate cache
111-
if: github.actor != 'dependabot[bot]'
111+
if: "!startsWith(github.head_ref, 'dependabot/')"
112112
uses: Swatinem/rust-cache@v2
113113

114114
- name: Check code
@@ -129,7 +129,7 @@ jobs:
129129
toolchain: nightly
130130

131131
- name: Activate cache
132-
if: github.actor != 'dependabot[bot]'
132+
if: "!startsWith(github.head_ref, 'dependabot/')"
133133
uses: Swatinem/rust-cache@v2
134134

135135
- name: Check docs

tests/data/new/custom-project-repo-name/.github/workflows/test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
toolchain: ${{ steps.minimal-version.outputs.msrv }}
5555

5656
- name: Activate cache
57-
if: github.actor != 'dependabot[bot]'
57+
if: "!startsWith(github.head_ref, 'dependabot/')"
5858
uses: Swatinem/rust-cache@v2
5959

6060
- name: Build crate
@@ -78,7 +78,7 @@ jobs:
7878
components: llvm-tools
7979

8080
- name: Activate cache
81-
if: github.actor != 'dependabot[bot]'
81+
if: "!startsWith(github.head_ref, 'dependabot/')"
8282
uses: Swatinem/rust-cache@v2
8383

8484
- name: Install cargo-llvm-cov
@@ -108,7 +108,7 @@ jobs:
108108
components: clippy, rustfmt
109109

110110
- name: Activate cache
111-
if: github.actor != 'dependabot[bot]'
111+
if: "!startsWith(github.head_ref, 'dependabot/')"
112112
uses: Swatinem/rust-cache@v2
113113

114114
- name: Check code
@@ -129,7 +129,7 @@ jobs:
129129
toolchain: nightly
130130

131131
- name: Activate cache
132-
if: github.actor != 'dependabot[bot]'
132+
if: "!startsWith(github.head_ref, 'dependabot/')"
133133
uses: Swatinem/rust-cache@v2
134134

135135
- name: Check docs

tests/data/new/custom-repo-name/.github/workflows/test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
toolchain: ${{ steps.minimal-version.outputs.msrv }}
5555

5656
- name: Activate cache
57-
if: github.actor != 'dependabot[bot]'
57+
if: "!startsWith(github.head_ref, 'dependabot/')"
5858
uses: Swatinem/rust-cache@v2
5959

6060
- name: Build crate
@@ -78,7 +78,7 @@ jobs:
7878
components: llvm-tools
7979

8080
- name: Activate cache
81-
if: github.actor != 'dependabot[bot]'
81+
if: "!startsWith(github.head_ref, 'dependabot/')"
8282
uses: Swatinem/rust-cache@v2
8383

8484
- name: Install cargo-llvm-cov
@@ -108,7 +108,7 @@ jobs:
108108
components: clippy, rustfmt
109109

110110
- name: Activate cache
111-
if: github.actor != 'dependabot[bot]'
111+
if: "!startsWith(github.head_ref, 'dependabot/')"
112112
uses: Swatinem/rust-cache@v2
113113

114114
- name: Check code
@@ -129,7 +129,7 @@ jobs:
129129
toolchain: nightly
130130

131131
- name: Activate cache
132-
if: github.actor != 'dependabot[bot]'
132+
if: "!startsWith(github.head_ref, 'dependabot/')"
133133
uses: Swatinem/rust-cache@v2
134134

135135
- name: Check docs

tests/data/new/description/.github/workflows/test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
toolchain: ${{ steps.minimal-version.outputs.msrv }}
5555

5656
- name: Activate cache
57-
if: github.actor != 'dependabot[bot]'
57+
if: "!startsWith(github.head_ref, 'dependabot/')"
5858
uses: Swatinem/rust-cache@v2
5959

6060
- name: Build crate
@@ -78,7 +78,7 @@ jobs:
7878
components: llvm-tools
7979

8080
- name: Activate cache
81-
if: github.actor != 'dependabot[bot]'
81+
if: "!startsWith(github.head_ref, 'dependabot/')"
8282
uses: Swatinem/rust-cache@v2
8383

8484
- name: Install cargo-llvm-cov
@@ -108,7 +108,7 @@ jobs:
108108
components: clippy, rustfmt
109109

110110
- name: Activate cache
111-
if: github.actor != 'dependabot[bot]'
111+
if: "!startsWith(github.head_ref, 'dependabot/')"
112112
uses: Swatinem/rust-cache@v2
113113

114114
- name: Check code
@@ -129,7 +129,7 @@ jobs:
129129
toolchain: nightly
130130

131131
- name: Activate cache
132-
if: github.actor != 'dependabot[bot]'
132+
if: "!startsWith(github.head_ref, 'dependabot/')"
133133
uses: Swatinem/rust-cache@v2
134134

135135
- name: Check docs

tests/data/new/lib/.github/workflows/test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
toolchain: ${{ steps.minimal-version.outputs.msrv }}
5555

5656
- name: Activate cache
57-
if: github.actor != 'dependabot[bot]'
57+
if: "!startsWith(github.head_ref, 'dependabot/')"
5858
uses: Swatinem/rust-cache@v2
5959

6060
- name: Build crate
@@ -78,7 +78,7 @@ jobs:
7878
components: llvm-tools
7979

8080
- name: Activate cache
81-
if: github.actor != 'dependabot[bot]'
81+
if: "!startsWith(github.head_ref, 'dependabot/')"
8282
uses: Swatinem/rust-cache@v2
8383

8484
- name: Install cargo-llvm-cov
@@ -108,7 +108,7 @@ jobs:
108108
components: clippy, rustfmt
109109

110110
- name: Activate cache
111-
if: github.actor != 'dependabot[bot]'
111+
if: "!startsWith(github.head_ref, 'dependabot/')"
112112
uses: Swatinem/rust-cache@v2
113113

114114
- name: Check code
@@ -129,7 +129,7 @@ jobs:
129129
toolchain: nightly
130130

131131
- name: Activate cache
132-
if: github.actor != 'dependabot[bot]'
132+
if: "!startsWith(github.head_ref, 'dependabot/')"
133133
uses: Swatinem/rust-cache@v2
134134

135135
- name: Check docs

0 commit comments

Comments
 (0)