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 11name : Main
22
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+
310on :
411 pull_request :
512 workflow_dispatch :
3845 - name : Install pre-commit hooks
3946 run : pre-commit install --install-hooks
4047
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+
4154 - name : Run pre-commit checks
4255 run : pre-commit run --show-diff-on-failure --all-files
4356 env :
You can’t perform that action at this time.
0 commit comments