ci: wait for tagged IPA builds

This commit is contained in:
CelloSerenity 2026-08-01 14:28:22 -06:00
parent c7e08e64fd
commit 30a147aaaf

View file

@ -1,21 +1,43 @@
name: Update StikDebug Source
on:
release:
types: [published]
workflow_dispatch:
push:
tags: ["[0-9]*"]
permissions:
actions: read
jobs:
update-source:
runs-on: ubuntu-latest
steps:
- name: Wait for IPA build
env:
GH_TOKEN: ${{ github.token }}
run: |
endpoint="$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/actions/workflows/build_ipa.yml/runs?event=push&branch=$GITHUB_REF_NAME&head_sha=$GITHUB_SHA"
for _ in {1..120}; do
run=$(curl --fail --silent --show-error \
-H "Authorization: Bearer $GH_TOKEN" \
-H "Accept: application/vnd.github+json" \
"$endpoint" | jq '.workflow_runs[0] // empty')
status=$(jq -r '.status // empty' <<< "$run")
conclusion=$(jq -r '.conclusion // empty' <<< "$run")
if [ "$status" = "completed" ]; then
test "$conclusion" = "success"
exit 0
fi
sleep 30
done
echo "Timed out waiting for Build Debug IPA."
exit 1
- name: Checkout Website-Stuff
uses: actions/checkout@v6
with:
repository: StephenDev0/Website-Stuff
ref: main
path: Website-Stuff
# A repository-scoped GITHUB_TOKEN cannot push to Website-Stuff.
token: ${{ secrets.WEBSITE_STUFF_TOKEN }}
- name: Set up Python