From ee1451b869ba1e381729b3d40489997021f0d562 Mon Sep 17 00:00:00 2001 From: Dimitar Popov Date: Tue, 27 Apr 2021 10:27:59 +0100 Subject: [PATCH] fix: bolean expression so we don't cancel runs on other PRs (#30) --- entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index 03faad5..30a657c 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -29,7 +29,7 @@ function convertToKeyValuePairs() { function getRunningWorkflowIds() { local workflow_ids - workflow_ids=$(jq ".workflow_runs | .[] | select(.head_branch==\"${branch?}\" and .head_repository.full_name==\"${repo?}\" and .status==\"in_progress\" or .status==\"queued\" or .status== \"waiting\") | .id ") + workflow_ids=$(jq ".workflow_runs | .[] | select(.head_branch==\"${branch?}\" and .head_repository.full_name==\"${repo?}\" and (.status==\"in_progress\" or .status==\"queued\" or .status== \"waiting\")) | .id ") local condition="<" for id in $workflow_ids; do if [[ "$id" -gt "$GITHUB_RUN_ID" ]]; then