Skip to content

[Test Package Versions Bump] Updating package versions #3496

[Test Package Versions Bump] Updating package versions

[Test Package Versions Bump] Updating package versions #3496

Workflow file for this run

name: Do Not Merge
on:
pull_request:
types: [synchronize, opened, reopened, labeled, unlabeled]
jobs:
do-not-merge:
name: Blocked by label
runs-on: ubuntu-latest
steps:
- name: Fail if 'status:do-not-merge' label is present
id: check-label
env:
LABELS_JSON: ${{ toJson(github.event.pull_request.labels) }}
run: |
set -x
# The multiline string needs to be reformed into 'real' JSON again
MATCH=$(jq -Rs 'fromjson | map(select(.name == "status:do-not-merge")) | length' <<<"$LABELS_JSON")
if [ "$MATCH" -gt 0 ]; then
echo "Label 'status:do-not-merge' is present. Failing the job."
echo "found=true" >> "$GITHUB_OUTPUT"
else
echo "Label 'status:do-not-merge' is NOT present. Passing."
echo "found=false" >> "$GITHUB_OUTPUT"
fi
- name: Fail if label is present
if: steps.check-label.outputs.found == 'true'
run: |
echo "❌ Label 'status:do-not-merge' is present. Failing the job."
exit 1