1 parent ba070df commit 093d38dCopy full SHA for 093d38d
1 file changed
.github/workflows/publish.yml
@@ -89,11 +89,15 @@ jobs:
89
90
find_run() {
91
local WF=$1
92
- gh api "repos/${{ github.repository }}/actions/workflows/$WF/runs?branch=$BRANCH&per_page=20" \
93
- --jq ".workflow_runs[] | select(.conclusion == \"success\") | .id" 2>/dev/null | \
94
- while read RUN_ID; do
+ local RUN_IDS
+ RUN_IDS=$(gh api "repos/${{ github.repository }}/actions/workflows/$WF/runs?branch=$BRANCH&per_page=20" \
+ --jq ".workflow_runs[] | select(.conclusion == \"success\") | .id")
95
+ for RUN_ID in $RUN_IDS; do
96
INPUT_TAG=$(gh api "repos/${{ github.repository }}/actions/runs/$RUN_ID" --jq '.inputs.tag // ""' 2>/dev/null)
- [ "$INPUT_TAG" = "$TAG" ] && echo "$RUN_ID" && return
97
+ if [ "$INPUT_TAG" = "$TAG" ]; then
98
+ echo "$RUN_ID"
99
+ return
100
+ fi
101
done
102
}
103
0 commit comments