diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index b7c0e73..4d58240 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -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