ci(zip-builder): run infra.zip_diff on pull requests only when the zip builder changes (#17026)

This commit is contained in:
Daymon authored and GitHub committed 2026-11-06 13:00:08 -06:00
1 parent e883de221e
commit 00ed1841fb
2 files changed
+19 -7

No files matched your search

+16 -5
View File
@@ -14,11 +14,26 @@
name: infra.zip_diff
# Pull requests only run this when they change the zip builder itself, so its effect on the zip
# shows up in review. Pushes to main still run on every change to the zip's inputs, to keep the
# framework cache current for those pull requests.
on:
workflow_dispatch:
pull_request:
paths:
- 'scripts/zip_builder/**'
- 'zip_builder.jsonc'
- 'zip_builder.json'
- '.github/workflows/infra.zip_diff.yml'
# Docs and the tool's own tests don't change the zip.
- '!scripts/zip_builder/**/*.md'
- '!scripts/zip_builder/Tests/**'
- '!scripts/zip_builder/Fixtures/**'
push:
branches:
- main
# Everything that can change the zip.
paths: &zip_inputs
paths:
- '**/*.swift'
- '**/*.h'
- '**/*.m'
@@ -51,10 +66,6 @@ on:
- '!**/Samples/**'
- '!SwiftPMTests/**'
- '!ReleaseTooling/**'
push:
branches:
- main
paths: *zip_inputs
permissions:
contents: read
+3 -2
View File
@@ -242,8 +242,9 @@ are recreated by every build, so a build with nothing to compile leaves no archi
- [`.github/workflows/infra.zip_builder.yml`](/.github/workflows/infra.zip_builder.yml): runs the tests, including the end-to-end build of the
fixture package.
- [`.github/workflows/infra.zip_diff.yml`](/.github/workflows/infra.zip_diff.yml): builds the zip from a pull request's base and merge
commits, and comments their `diff` on the pull request. Its steps are in
- [`.github/workflows/infra.zip_diff.yml`](/.github/workflows/infra.zip_diff.yml): for pull requests that change the zip builder (its
sources, CI scripts or `zip_builder.jsonc`), builds the zip from the base and merge commits, and
comments their `diff` on the pull request. Its steps are in
[`ci/zip_diff.sh`](ci/zip_diff.sh): each zip is built with its own commit's version, and the
`diff` step writes the comment with `--format github-comment`, which the
[`pr_comment`](/.github/actions/pr_comment) action posts.