From 28e056540c4620feec3f0017c7a52c4ff3521a26 Mon Sep 17 00:00:00 2001 From: Friedrich Wilken Date: Thu, 25 Jan 2024 10:32:54 +0100 Subject: [PATCH] exit 1 if pr was closed --- .github/workflows/bump-sec-scanners-config-reusable.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/bump-sec-scanners-config-reusable.yml b/.github/workflows/bump-sec-scanners-config-reusable.yml index 32af35b..8bcc5e0 100644 --- a/.github/workflows/bump-sec-scanners-config-reusable.yml +++ b/.github/workflows/bump-sec-scanners-config-reusable.yml @@ -14,7 +14,9 @@ # # If changes were done by the script, the workflow will create a PR and wait for it to be merged. # The waiting will happen with a timeout that can be set via the input of `timeout`. The units are seconds. -# It has a default value of 3600 (seconds (= 1 hour)). +# It has a default value of 3600 (seconds (= 1 hour)). Note that GitHub Action jobs will automatically fail after 6 hours: +# Further reads: +# Default limits for GitHub Actions: https://docs.github.com/en/actions/learn-github-actions/usage-limits-billing-and-administration#usage-limits # # Examples of using this workflow: # 1. Set all awailable inputs and secrets. @@ -169,6 +171,7 @@ jobs: pr_state=$(gh pr view ${PR_URL} --json state --jq '.state') if [ "$pr_state" == "CLOSED" ]; then echo "ERROR! PR has been closed!" + exit 1 elif [ "$pr_state" == "MERGED" ]; then echo "PR has been merged!" exit 0