Add job summary to iOS deploy workflow - #871
Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The deprecated "app-store" method uploads but doesn't auto-distribute to internal testers. The "app-store-connect" method is required for testFlightInternalTestingOnly to take effect. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds a GitHub Actions job summary to the iOS deploy workflow so each run surfaces the deployed app version, computed build number, and commit SHA.
Changes:
- Exposes the computed build number as a step output from the “Set build number” step.
- Appends a Markdown table to
$GITHUB_STEP_SUMMARYafter a successful deploy.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - name: Write job summary | ||
| if: success() | ||
| env: | ||
| BUILD_NUMBER: ${{ steps.build-number.outputs.value }} |
There was a problem hiding this comment.
steps.build-number.outputs.value will be parsed as steps.build - number... because - is the subtraction operator in GitHub Actions expressions. As written, BUILD_NUMBER will not resolve. Rename the step id to use _ (e.g., build_number) or reference it with bracket notation: ${{ steps['build-number'].outputs.value }}.
| BUILD_NUMBER: ${{ steps.build-number.outputs.value }} | |
| BUILD_NUMBER: ${{ steps['build-number'].outputs.value }} |
There was a problem hiding this comment.
Skipping — GitHub Actions identifiers support hyphens in dot notation ([a-zA-Z_][a-zA-Z0-9_-]*). steps.build-number.outputs.value resolves correctly and is used throughout the codebase.
Mobile PreviewScan to open on device:
To test on device:
|
|
Storybook previews for This comment updates automatically on each PR push. |
CI gate summary links to deploy workflow pages on main pushes. Deploy iOS summary links back to the triggering CI run. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
CI's build-ios-native now uploads the .xcarchive as an artifact. Deploy iOS downloads it and just signs/exports/uploads — skipping expo prebuild, pod install, and xcodebuild archive entirely. Falls back to building from scratch on workflow_dispatch or if the CI artifact is missing. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Deploy now errors if no archive artifact is found — no more building from scratch. For workflow_dispatch, finds the most recent successful CI run on main via gh CLI. Also reduced timeout from 60m to 30m since we're only signing and uploading, not building. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Docker image is now built and pushed to GHCR as part of CI (main pushes only, after ci-gate passes). Deploy Web no longer builds — it verifies the image exists, runs Terraform, and deploys. This follows the same principle as iOS deploy: CI builds, deploy just publishes/deploys pre-built artifacts. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Matches the pattern of build-mobile.yml and build-web.yml — CI orchestrates, build workflows are self-contained. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| SHORT_SHA=$(echo "$SHA" | head -c 7) | ||
| IMAGE="ghcr.io/asherlc/dofek:sha-${SHORT_SHA}" | ||
| echo "Checking for image: $IMAGE" | ||
| if ! gh api "/orgs/$(echo '${{ github.repository_owner }}' | tr '[:upper:]' '[:lower:]')/packages/container/dofek/versions" \ |
There was a problem hiding this comment.
The GHCR API path here uses /orgs/.../packages/..., but this repo’s image is under the user namespace (ghcr.io/asherlc/dofek). For user-owned packages the REST path is /users/{username}/packages/container/{package}/versions; using /orgs will 404 and make deploys fail.
| if ! gh api "/orgs/$(echo '${{ github.repository_owner }}' | tr '[:upper:]' '[:lower:]')/packages/container/dofek/versions" \ | |
| if ! gh api "/users/$(echo '${{ github.repository_owner }}' | tr '[:upper:]' '[:lower:]')/packages/container/dofek/versions" \ |
There was a problem hiding this comment.
Fixed in f512ceed. Changed to /users/ since this is a user-owned package.
| - name: Verify Docker image exists | ||
| if: steps.latest.outputs.should_deploy == 'true' | ||
| env: | ||
| SHA: ${{ steps.resolve.outputs.sha }} | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | |
There was a problem hiding this comment.
This step relies on gh api to read GHCR package versions/tags, but the workflow doesn’t declare any permissions:. If the repo default token permissions are read-only (common), the GITHUB_TOKEN may not have packages: read, causing this check to fail. Consider adding explicit permissions: packages: read (and possibly contents: read) at workflow or job scope.
There was a problem hiding this comment.
Fixed in f512ceed. Added permissions: { contents: read, packages: read }.
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | | ||
| if [ "$EVENT_NAME" != "workflow_dispatch" ]; then | ||
| echo "run_id=$WORKFLOW_RUN_ID" >> "$GITHUB_OUTPUT" | ||
| echo "Using triggering CI run: $WORKFLOW_RUN_ID" | ||
| exit 0 | ||
| fi | ||
|
|
There was a problem hiding this comment.
Find CI run with archive treats every non-workflow_dispatch trigger as workflow_run, but this workflow is also callable via workflow_call (see deploy.yml). In that case github.event.workflow_run.id is unset, so this writes an empty run_id, and the later actions/download-artifact with run-id: will fail.
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| if [ "$EVENT_NAME" != "workflow_dispatch" ]; then | |
| echo "run_id=$WORKFLOW_RUN_ID" >> "$GITHUB_OUTPUT" | |
| echo "Using triggering CI run: $WORKFLOW_RUN_ID" | |
| exit 0 | |
| fi | |
| RESOLVED_SHA: ${{ steps.resolve.outputs.sha }} | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| if [ "$EVENT_NAME" = "workflow_run" ]; then | |
| echo "run_id=$WORKFLOW_RUN_ID" >> "$GITHUB_OUTPUT" | |
| echo "Using triggering CI run: $WORKFLOW_RUN_ID" | |
| exit 0 | |
| fi | |
| if [ "$EVENT_NAME" = "workflow_call" ]; then | |
| RUN_ID=$(gh run list \ | |
| --workflow=ci.yml \ | |
| --commit="$RESOLVED_SHA" \ | |
| --status=success \ | |
| --limit=1 \ | |
| --json databaseId \ | |
| --jq '.[0].databaseId') | |
| if [ -z "$RUN_ID" ] || [ "$RUN_ID" = "null" ]; then | |
| echo "No successful CI run found for commit $RESOLVED_SHA" | |
| exit 1 | |
| fi | |
| echo "run_id=$RUN_ID" >> "$GITHUB_OUTPUT" | |
| echo "Using successful CI run for commit $RESOLVED_SHA: $RUN_ID" | |
| exit 0 | |
| fi |
There was a problem hiding this comment.
Fixed in f512ceed. Now explicitly checks for workflow_run and falls through to commit-based lookup for both workflow_dispatch and workflow_call.
| # For manual dispatch, find the most recent successful CI run on main | ||
| RUN_ID=$(gh run list \ | ||
| --workflow=ci.yml \ | ||
| --branch=main \ | ||
| --status=success \ | ||
| --limit=1 \ | ||
| --json databaseId \ | ||
| --jq '.[0].databaseId') |
There was a problem hiding this comment.
For workflow_dispatch, this selects the most recent successful CI run on main regardless of the resolved commit_sha being deployed. If the caller supplies commit_sha (or main has advanced since the last successful CI), you can end up exporting/uploading an archive from a different commit than the one checked out, which is a correctness/release integrity issue. Prefer finding the CI run for the specific commit SHA (and/or verify the downloaded archive’s commit matches before uploading).
There was a problem hiding this comment.
Fixed in f512ceed. Now uses --commit=$COMMIT_SHA to find the CI run for the specific commit instead of just the latest on main.
| build-docker: | ||
| name: Build Docker | ||
| needs: [ci-gate] | ||
| uses: ./.github/workflows/build-docker.yml | ||
| secrets: inherit |
There was a problem hiding this comment.
build-docker.yml requests packages: write, but in reusable workflows the called workflow’s GITHUB_TOKEN permissions cannot exceed the caller workflow’s permissions. ci.yml currently doesn’t grant packages: write, so the docker push to GHCR is likely to fail. Add packages: write to ci.yml (or set job-level permissions on the build-docker job in the caller).
There was a problem hiding this comment.
Fixed in f512ceed. Restored packages: write in ci.yml.
- deploy-web: /orgs/ → /users/ for user-owned GHCR packages - deploy-web: add permissions (contents: read, packages: read) - deploy-ios: handle workflow_call trigger (was only handling workflow_run and workflow_dispatch) - deploy-ios: find CI run by commit SHA instead of latest on main, preventing archive/commit mismatch on manual dispatch - ci.yml: restore packages: write (needed by build-docker reusable workflow) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
CR comment summaryFixed (5)
Declined (1)
All fixes in |
Summary
Test plan
workflow_dispatchand verify the summary table appears on the run page🤖 Generated with Claude Code