Skip to content

Commit b8d41cf

Browse files
committed
Update workflows to fail on new secrets detected
1 parent a2268b0 commit b8d41cf

2 files changed

Lines changed: 12 additions & 6 deletions

File tree

.github/workflows/gradle-build.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@ jobs:
2121
java-version: 21
2222
distribution: 'temurin'
2323
cache: gradle
24-
- name: Detect Secrets
25-
uses: RobertFischer/detect-secrets-action@v2.0.0
24+
- name: Detect secrets
25+
run: |
26+
pip install detect-secrets
27+
git ls-files -z | xargs -0 detect-secrets-hook --baseline .secrets.baseline
2628
- name: Grant Execute permission for gradlew
2729
run: chmod +x gradlew
2830
- name: Build with Gradle

.github/workflows/preview-and-release.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@ jobs:
2828
runs-on: ubuntu-latest
2929
steps:
3030
- uses: actions/checkout@v4
31-
- name: Easy detect-secrets
32-
uses: RobertFischer/detect-secrets-action@v2.0.0
31+
- name: Detect secrets
32+
run: |
33+
pip install detect-secrets
34+
git ls-files -z | xargs -0 detect-secrets-hook --baseline .secrets.baseline
3335
- name: Set up JDK
3436
uses: actions/setup-java@v4
3537
with:
@@ -66,8 +68,10 @@ jobs:
6668
java-version: 21
6769
distribution: 'temurin'
6870
cache: gradle
69-
- name: Easy detect-secrets
70-
uses: RobertFischer/detect-secrets-action@v2.0.0
71+
- name: Detect secrets
72+
run: |
73+
pip install detect-secrets
74+
git ls-files -z | xargs -0 detect-secrets-hook --baseline .secrets.baseline
7175
- name: Download File
7276
run: .\Scripts\decodeAndWrite.ps1 -encodedValue $env:ENCODED_VALUE -outputPath $env:OUTPUT_PATH
7377
shell: pwsh

0 commit comments

Comments
 (0)