Repository navigation
Run the workflow on pull requests, and only on main for pushes - #28
Merged
Merged
Conversation
A pull request never ran this workflow: the only trigger was a push, and a push to a fork does not run the workflow of the base repository. Pull requests #22, #23 and #24 all show "no checks reported" and were merged without a single job having seen them; the jobs ran on main afterwards. That is how the test that #22 added reached main-adjacent review still failing on arm64 Linux, which linux-arm64 and linux-musl-arm64 would have caught at once. Pushes are now limited to main, since a pull request from a branch of this repository would otherwise run all 14 jobs twice, once for the push and once for the pull request. To run the jobs on a branch of its own, as a dry run of a fork's pull request for instance, use the workflow_dispatch that is already here: gh workflow run main.yml --ref <branch>. The signing steps are skipped where there are no secrets to sign with, which is every pull request from a fork: the build and the tests still run, which is what the pull request is for, and without this the six macOS, iOS and xcframework jobs would fail on every outside contribution. Their artifacts are then unsigned, and the release job runs only for main, so an unsigned artifact is never released. A secret can be read in a job's env but not in a step's if, which is why SIGNING is an env entry. This takes effect for pull requests opened after it is merged: GitHub reads the workflow of the base branch for a pull_request event, so this branch cannot run its own new trigger. It was checked with a workflow_dispatch run on the branch instead. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A pull request has never run this workflow. The only trigger was
push, and a push to a fork does not run the base repository's workflow, so every pull request this project has had shows "no checks reported":All three were merged without a single job having seen them; the 14 jobs ran on
mainafterwards. That is how the test #22 added reached review still failing on arm64 Linux —PTHREAD_STACK_MINis 128 KB there, so the 64 KB thread it asks for cannot be created — whichlinux-arm64andlinux-musl-arm64would have caught at once.What changes
pull_requestis now a trigger, so a pull request from a fork runs all 14 jobs.pushis limited tomain. Keeping'**'alongsidepull_requestwould run everything twice for a pull request from a branch of this repository, once per event — 28 jobs, including the macOS runners and six notarizations. To run the jobs on a branch of its own, which is useful as a dry run of a fork's pull request before merging it, theworkflow_dispatchthat is already here does it:The signing steps are skipped where there is nothing to sign with. A pull request from a fork gets no secrets, so without this the six macOS, iOS and xcframework jobs would fail on every outside contribution, at
security importor atnotarytool submit. They now run the build and the tests and skip signing, which is what the pull request is for. Those artifacts are unsigned, andreleaseruns only formain(if: github.ref == 'refs/heads/main'), so an unsigned artifact is never released. A secret can be read in a job'senvbut not in a step'sif, henceSIGNINGas an env entry rather than a condition onsecretsdirectly.How it was checked
This branch cannot run its own new trigger: GitHub reads the workflow of the base branch for a
pull_requestevent, andmainhas no such trigger yet. So this pull request shows no checks either — the last one that will.Checked instead by:
pushis limited tomain;workflow_dispatchrun on the branch, which uses this file and runs all 14 jobs: run 43424592133;releasecondition.Worth doing right after merging: open a throwaway pull request from a branch here and check that exactly one run appears, from the
pull_requestevent and not two.🤖 Generated with Claude Code