From 8918410a0fac7f5f78e983daee715798fce4a009 Mon Sep 17 00:00:00 2001 From: CoderDeltaLan Date: Sat, 13 Sep 2025 05:05:44 +0100 Subject: [PATCH] ci: add audit for direct pushes to main (private repo without protection) --- .github/workflows/main-audit.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/workflows/main-audit.yml diff --git a/.github/workflows/main-audit.yml b/.github/workflows/main-audit.yml new file mode 100644 index 0000000..7a58a30 --- /dev/null +++ b/.github/workflows/main-audit.yml @@ -0,0 +1,15 @@ +name: audit-main-push +on: + push: + branches: [main] +jobs: + audit: + runs-on: ubuntu-latest + steps: + - name: Fail if direct push (non-PR merge) + run: | + echo "Actor: $GITHUB_ACTOR" + if [ "$GITHUB_ACTOR" != "web-flow" ]; then + echo "Direct push to main detected (no branch protection available on private Free)." + exit 1 + fi