From 30a147aaafe50dc551a391924236abedf4ad37d2 Mon Sep 17 00:00:00 2001 From: CelloSerenity <195480169+CelloSerenity@users.noreply.github.com> Date: Sat, 1 Aug 2026 14:28:22 -0600 Subject: [PATCH] ci: wait for tagged IPA builds --- .github/workflows/updatesource.yml | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/.github/workflows/updatesource.yml b/.github/workflows/updatesource.yml index 79dd171..3d6dbe4 100644 --- a/.github/workflows/updatesource.yml +++ b/.github/workflows/updatesource.yml @@ -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