Fix iOS artifact storage and broken pipe error (#5693)

1. Don't upload IPA artifact after TestFlight upload - it's redundant
   and takes 150MB per build. Only keep artifact when skipping upload
   (for debugging), with 1-day retention.

2. Fix "broken pipe" error in artifact storage check by writing to temp
   file instead of piping through sort | head (which causes SIGPIPE).

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-29 16:44:28 -08:00
committed by GitHub
co-authored by Claude Opus 4.5
parent 921b11c075
commit 9171222a45
2 changed files with 7 additions and 4 deletions
+4 -2
View File
@@ -27,10 +27,12 @@ jobs:
echo "::error::Artifact storage is ${total_mb} MB, which exceeds the 500 MB threshold!"
echo ""
echo "Largest artifacts:"
# Save to temp file to avoid SIGPIPE/broken pipe errors with head
gh api "repos/${{ github.repository }}/actions/artifacts" \
--paginate -q '.artifacts[] | "\(.size_in_bytes)\t\(.name)\t\(.created_at)"' | \
sort -rn | head -20 | \
--paginate -q '.artifacts[] | "\(.size_in_bytes)\t\(.name)\t\(.created_at)"' > /tmp/artifacts.txt
sort -rn /tmp/artifacts.txt | head -20 | \
awk -F'\t' '{printf "%d MB\t%s\t%s\n", $1/1024/1024, $2, $3}'
rm -f /tmp/artifacts.txt
exit 1
fi
+3 -2
View File
@@ -172,12 +172,13 @@ jobs:
./ci/github_actions/upload_testflight.sh "$EAGLE0_BUILD_DIR/archive/eagle0.ipa"
- name: Upload IPA artifact
if: success()
# Only keep artifact if we skipped TestFlight upload (for debugging)
if: success() && github.event.inputs.skip_upload == 'true'
uses: actions/upload-artifact@v4
with:
name: eagle0-ios-${{ github.run_id }}
path: ${{ env.EAGLE0_BUILD_DIR }}/archive/eagle0.ipa
retention-days: 7
retention-days: 1
- name: Cleanup Keychain
if: always()