Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 28 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,17 +162,41 @@ jobs:
echo "CHANGELOG.md is up to date."
fi

forbid-artifacts:
name: 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
if git ls-files | grep -qE '(\.ssh/|\.db($|-)|.*\.sqlite|.*\.log$)'; then
echo "ERROR: forbidden files are tracked:"
git ls-files | grep -E '(\.ssh/|\.db($|-)|.*\.sqlite|.*\.log$)' || true
exit 1
fi
- name: Fail if history contains forbidden blobs
run: |
set -euo pipefail
if git rev-list --objects --all | grep -qE '(\.ssh/|.*\.db($|-)|.*\.sqlite|.*\.log$)'; then
echo "ERROR: forbidden artifacts exist in history:"
git rev-list --objects --all | grep -E '(\.ssh/|.*\.db($|-)|.*\.sqlite|.*\.log$)' || true
exit 1
fi
gate:
name: CI Gate
runs-on: ubuntu-latest
needs: [test, lint, package]
needs: [test, lint, package, forbid-artifacts]
if: always()
steps:
- name: All required checks passed
run: |
if [[ "${{ needs.test.result }}" != "success" ]] ||
[[ "${{ needs.lint.result }}" != "success" ]] ||
[[ "${{ needs.package.result }}" != "success" ]]; then
if [[ "${{ needs.test.result }}" != "success" ]] ||
[[ "${{ needs.lint.result }}" != "success" ]] ||
[[ "${{ needs.package.result }}" != "success" ]] ||
[[ "${{ needs.forbid-artifacts.result }}" != "success" ]]; then
echo "::error::One or more required checks failed — merge blocked."
exit 1
fi
Expand Down
32 changes: 0 additions & 32 deletions .github/workflows/repo-safety.yml

This file was deleted.

Loading