Skip to content

Commit f58bb71

Browse files
authored
♻️ use shared betterleaks (#474)
1 parent 0fe9211 commit f58bb71

3 files changed

Lines changed: 14 additions & 34 deletions

File tree

‎.github/workflows/_static-analysis.yml‎

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -12,34 +12,6 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@v7
15-
with:
16-
# Betterleaks scans git history across refs, so it needs the full
17-
# history rather than the default shallow clone.
18-
fetch-depth: 0
19-
20-
- name: Run Betterleaks
21-
id: betterleaks
22-
continue-on-error: true
23-
# version 0.1.0
24-
uses: dortort/betterleaks-action@cd0b905aa4befb8f42f8b1ab98150180c9e77515
25-
with:
26-
version: "v1.9.0"
27-
report-path: betterleaks-report.sarif
28-
github-token: ${{ secrets.GITHUB_TOKEN }}
29-
30-
- name: Upload Betterleaks report
31-
uses: actions/upload-artifact@v7
32-
if: always()
33-
with:
34-
name: betterleaks-report
35-
if-no-files-found: warn
36-
path: ${{ steps.betterleaks.outputs.report-path }}
37-
38-
- name: Fail if Betterleaks found leaks
39-
if: steps.betterleaks.outcome == 'failure'
40-
run: |
41-
echo "Betterleaks reported a failure in at least one scan."
42-
exit 1
4315

4416
- name: Set up Python
4517
uses: actions/setup-python@v7
@@ -73,6 +45,7 @@ jobs:
7345
7446
- name: Run all static analysis
7547
env:
48+
# betterleaks is run in a separate workflow
7649
SKIP: betterleaks,sphinx-html,sphinx-linkcheck
7750
run: |
7851
prek run --all-files

‎.github/workflows/pull-request.yml‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,16 @@ permissions:
1010
jobs:
1111
workflow-lint:
1212
uses: mindee/client-lib-actions/.github/workflows/workflow-lint.yml@main
13+
betterleaks:
14+
uses: mindee/client-lib-actions/.github/workflows/betterleaks.yml@main
15+
needs: workflow-lint
16+
secrets: inherit
1317
static-analysis:
1418
uses: ./.github/workflows/_static-analysis.yml
1519
needs: workflow-lint
1620
test-units:
1721
uses: ./.github/workflows/_test-units.yml
18-
needs: static-analysis
22+
needs: [ betterleaks, static-analysis ]
1923
secrets: inherit
2024
test-regressions:
2125
uses: ./.github/workflows/_test-regressions.yml

‎.github/workflows/push-main-branch.yml‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,18 @@ on:
66
- main
77

88
jobs:
9+
betterleaks:
10+
uses: mindee/client-lib-actions/.github/workflows/betterleaks.yml@main
11+
secrets: inherit
912
static-analysis:
10-
uses: mindee/mindee-api-python/.github/workflows/_static-analysis.yml@main
11-
test_units:
12-
uses: mindee/mindee-api-python/.github/workflows/_test-units.yml@main
13-
needs: static-analysis
13+
uses: mindee/mindee-api-ruby/.github/workflows/_static-analysis.yml@main
14+
test-units:
15+
uses: mindee/mindee-api-ruby/.github/workflows/_test-units.yml@main
16+
needs: [ betterleaks, static-analysis ]
1417
secrets: inherit
1518
tag:
1619
uses: mindee/client-lib-actions/.github/workflows/tag-version.yml@main
17-
needs: test_units
20+
needs: test-units
1821
release:
1922
uses: mindee/client-lib-actions/.github/workflows/create-release.yml@main
2023
needs: tag

0 commit comments

Comments
 (0)