File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 1
1
name : Main
2
2
3
+ # About steps requiring the GITGUARDIAN_API_KEY:
4
+ #
5
+ # For security reasons, secrets are not available when a workflow is triggered
6
+ # by a pull request from a fork. This causes all steps requiring the
7
+ # GITGUARDIAN_API_KEY to fail. To avoid this, we skip those steps when we are
8
+ # triggered by a pull request from a fork.
9
+
3
10
on :
4
11
pull_request :
5
12
workflow_dispatch :
38
45
- name : Install pre-commit hooks
39
46
run : pre-commit install --install-hooks
40
47
48
+ - name : Skip ggshield hooks when running from a fork
49
+ # See note about steps requiring the GITGUARDIAN_API at the top of this file
50
+ if : ${{ github.event.pull_request.head.repo.fork }}
51
+ run : |
52
+ echo "SKIP=ggshield" >> $GITHUB_ENV
53
+
41
54
- name : Run pre-commit checks
42
55
run : pre-commit run --show-diff-on-failure --all-files
43
56
env :
You can’t perform that action at this time.
0 commit comments