test: verify required status blocks red PR #98

Closed
arnaud.dartois wants to merge 1 commits from test/ci-policy-red into main
pull from: test/ci-policy-red
+6
View File
@@ -44,9 +44,15 @@ jobs:
CURRENT_SHA: ${{ gitea.sha }}
EVENT_NAME: ${{ gitea.event_name }}
IS_RELEASE_TAG: ${{ startsWith(gitea.ref, 'refs/tags/v') }}
PR_HEAD_REF: ${{ gitea.event.pull_request.head.ref }}
run: |
set -eu
if [ "$EVENT_NAME" = pull_request ] && [ "$PR_HEAD_REF" = test/ci-policy-red ]; then
echo 'Intentional CI policy rejection test.' >&2
exit 1
fi
if [ "$EVENT_NAME" = pull_request ]; then
changed_files="$(git diff --name-only "$PR_BASE_SHA...HEAD")"
elif [ "$IS_RELEASE_TAG" = true ]; then