This commit is contained in:
David Daly
2024-01-31 09:04:06 +00:00
committed by Edwin Sirko
parent cb79bd1a60
commit 8a5726de70
+5 -5
View File
@@ -25,8 +25,8 @@ jobs:
- name: Wait for successful publish
id: wait-for-successful-publish
run: |
START_TIME=$SECONDS
TIMESTAMP=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
START_TIME="$SECONDS"
TIMESTAMP="$(date -u +"%Y-%m-%dT%H:%M:%SZ")"
while (( SECONDS - START_TIME < 60 )); do
echo "Polling for workflow created after $TIMESTAMP"
RESULT=$(curl -s -L -H "Accept: application/vnd.github+json" \
@@ -36,9 +36,9 @@ jobs:
| jq '.workflow_runs[] | select(.name=="Publish Actions Package" and (.display_title | contains("${{ github.sha }}"))) | .status, .conclusion')
# split the RESULT into an array
RESULT=($RESULT)
STATUS=$(echo ${RESULT[0]} | sed -e 's/^"//' -e 's/"$//')
CONCLUSION=$(echo ${RESULT[1]} | sed -e 's/^"//' -e 's/"$//')
mapfile -t RESULT <<< "$RESULT"
STATUS=$(echo "${RESULT[0]}" | sed -e 's/^"//' -e 's/"$//')
CONCLUSION=$(echo "${RESULT[1]}" | sed -e 's/^"//' -e 's/"$//')
if [ -z "$STATUS" ]; then
echo "No workflow found yet"
else