Skip to content

Add pre-commit hook to detect secrets #4

Add pre-commit hook to detect secrets

Add pre-commit hook to detect secrets #4

name: Detect Secrets
on:
push:
branches:
- "feat/setup"
pull_request:
branches:
- "develop"
- "staging"
- "main"
jobs:
detect-secrets:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Detect-Secrets
run: |
pip install detect-secrets
- name: Run Detect-Secrets
run: |
detect-secrets scan
detect-secrets scan --baseline .secrets.baseline || (echo "Secrets detected! Failing the workflow." && exit 1)