Skip to content

Commit 8624f7e

Browse files
agateau-ggpierrelalanne
authored andcommitted
chore(ci): setup ggshield CI check
1 parent 8e77904 commit 8624f7e

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

.github/workflows/test.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@ name: Go
22

33
on:
44
push:
5-
branches: [main]
65
pull_request:
7-
branches: [main]
86

97
jobs:
108
golangci:
@@ -37,6 +35,23 @@ jobs:
3735
run: |
3836
go test -race $(go list ./...) -v -coverprofile=.coverage.out
3937
go tool cover -func=.coverage.out
38+
ggshield:
39+
name: Scan code with ggshield
40+
runs-on: ubuntu-latest
41+
if: github.event_name == 'push'
42+
steps:
43+
- name: Checkout
44+
uses: actions/checkout@v2
45+
with:
46+
fetch-depth: 0 # fetch all history so multiple commits can be scanned
47+
- name: Scan code with ggshield
48+
uses: GitGuardian/ggshield-action@master
49+
env:
50+
GITHUB_PUSH_BEFORE_SHA: ${{ github.event.before }}
51+
GITHUB_PUSH_BASE_SHA: ${{ github.event.base }}
52+
GITHUB_PULL_BASE_SHA: ${{ github.event.pull_request.base.sha }}
53+
GITHUB_DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
54+
GITGUARDIAN_API_KEY: ${{ secrets.GITGUARDIAN_API_KEY }}
4055
integration-tests:
4156
name: Integration Tests
4257
runs-on: ${{ matrix.os }}

0 commit comments

Comments
 (0)