style(obs): align dashboard highlight formatting #268
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: repo-safety | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| forbid-artifacts: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Fail if forbidden paths are tracked | |
| run: | | |
| set -euo pipefail | |
| echo "Checking tracked files..." | |
| if git ls-files | egrep -q '(^\.ssh/|\.db($|-)|\.sqlite|\.log$)'; then | |
| echo "ERROR: forbidden files are tracked:" | |
| git ls-files | egrep '(^\.ssh/|\.db($|-)|\.sqlite|\.log$)' || true | |
| exit 1 | |
| fi | |
| - name: Fail if history contains forbidden blobs | |
| run: | | |
| set -euo pipefail | |
| echo "Checking full history objects..." | |
| if git rev-list --objects --all | egrep -q '(^|/)(\.ssh/|.*\.db($|-)|.*\.sqlite|.*\.log$)'; then | |
| echo "ERROR: forbidden artifacts exist in history:" | |
| git rev-list --objects --all | egrep '(^|/)(\.ssh/|.*\.db($|-)|.*\.sqlite|.*\.log$)' || true | |
| exit 1 | |
| fi |