Skip to content

Commit 313a742

Browse files
committed
Add guard against leaving temporary workflow runs
1 parent d50c883 commit 313a742

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

.github/workflows/testing.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,16 @@ jobs:
3939
data-directory: ${{ env.EIT_PROCESSING_TEST_DATA }}
4040
- name: Run pytest
4141
run: uv run pytest -v
42+
43+
# Guard: fail on PR to develop if 'ci/uv' is referenced in workflows
44+
- name: Ensure 'ci/uv' is not referenced in workflows
45+
if: ${{ github.event_name == 'pull_request' && github.base_ref == 'develop' }}
46+
shell: bash
47+
run: |
48+
set -euo pipefail
49+
if grep -R -nE '^[[:space:]]*-[[:space:]]*ci/uv[[:space:]]*$' .github/workflows/*.yml; then
50+
echo "::error title=Remove 'ci/uv' from workflow triggers::Found 'ci/uv' branch listed under on.push.branches in workflow(s). Remove it before merging into 'develop'."
51+
exit 1
52+
fi
53+
echo "::error title=Remove guard from workflow::This guard is only needed until 'ci/uv' is removed from workflows. Remove this step after that."
54+
exit 1

0 commit comments

Comments
 (0)