Repository navigation
ci(repo): run jobs that make no GitHub API call on free runners - #271
Conversation
The org IP allow list refuses GITHUB_TOKEN writes from standard runners but not reads of this public repository, so jobs that only read keep actions/checkout and move to ubuntu-latest. Jobs that push, tag, release, comment or label stay on the static-IP group. Checkouts no longer persist the token unless a later step pushes with git, and every external action is pinned to a commit SHA. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The job only reads the repository, which the IP allow list permits from standard runners, so it returns to macos-latest from scaleway-macos. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Like the iOS build, the job only reads the repository, so it returns to macos-latest from scaleway-macos. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bot-commit and flutter-web-pr-comment call the GitHub API, which the org IP allow list refuses from standard runners. The flutter-web deploy, remove and target actions make no GitHub call and run anywhere. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A "/" directory covers only .github/workflows, so the actions under .github/actions, which other repositories run, were left out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Drop `pull-requests: read` where no step reads pull requests. - Upload only the listed coverage files, so Codecov stops picking up an IDE run configuration as a report. - Name action-slack's pin by the release it matches (v3.19.0), so Dependabot can compare it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
update_goldens renders on the static-IP runners' ubuntu-24.04, while ubuntu-latest is now 26.04, so test pins 24.04 to keep regenerated goldens matching. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
update_goldens rendered on the static-IP group, whose image an admin can change without us noticing. It now renders on ubuntu-24.04, the image `test` compares on, and only the commit through the API runs on the static-IP group. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both jobs are on free runners now, so they follow the same label without a pinned image to bump. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
See video: https://github.com/GetStream/stream-video-flutter/blob/v2/.github/workflows/pr_web_build.yml
This can run on generic runners, only the PR comment should run on github-public-amd64
There was a problem hiding this comment.
Done in f69e443, following video's layout: deploy and remove run on ubuntu-latest, and the comment moved into comment / remove_comment jobs on github-public-amd64. The release workflow's prod gallery deploy moved too, since it only builds and deploys to GCP.
There was a problem hiding this comment.
Let's check if we can also run this on generic runners, only the actual push/commit to github has to run on github-public-amd64, see for example update_goldens in video: https://github.com/GetStream/stream-video-flutter/blob/v2/.github/workflows/update_goldens.yml
There was a problem hiding this comment.
Done in f69e443: build_gallery builds on ubuntu-latest and uploads build/web; publish_pages on github-public-amd64 downloads it and runs the same commit and force-push to gh-pages that flutter-gh-pages did, so that action is gone. deploy_hosted (GCP only) moved to ubuntu-latest as well.
There was a problem hiding this comment.
Update: dropped the GitHub Pages deploy instead (9782b46). flutter.getstream.io/design-system now hosts beta and prod, and nothing links to the github.io copy, so publish_gallery is just deploy_hosted on ubuntu-latest. After merge I'll point the repo's website field at flutter.getstream.io/design-system/, turn off Pages and delete gh-pages.
Building and deploying to Google Cloud make no GitHub API call, so the PR, beta and prod gallery deploys move to ubuntu-latest. Only the steps that call GitHub stay on the static-IP group: the PR comment, and the gh-pages push, which now commits a build made in a separate job instead of building inside flutter-gh-pages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The GitHub Pages build also uses the bootstrap action, as the flutter.getstream.io deploy beside it does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… commit Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
flutter.getstream.io/design-system hosts the gallery's beta and prod builds, and nothing links to the GitHub Pages copy, so the gh-pages build and push go, along with their static-IP job. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With an empty token, paths-filter diffs pull requests with git against the base branch instead of the GitHub API, which the org IP allow list refuses from standard runners. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A pull request's test merge commit has the base branch as its first parent, so diffing the last two commits lists the pull request's changes without paths-filter or a token. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Without --no-renames git lists a moved file only under its new path, so a pull request moving a file out of packages/ skipped the analysis, unlike paths-filter. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
detect_changes.yml tells whether a pull request or push changes any of the given globs, diffing with git instead of the GitHub API that dorny/paths-filter calls, so gates run on free runners without a token. Chat and chat-ai gate five workflows with paths-filter and can switch to it. The legacy-analysis gate is the first caller. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…workflows Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Jobs that main's ruleset requires as status checks keep their IDs as their names, since a required check is matched by name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Run the legacy analysis when its gate fails: a skipped required check passes, so a broken gate would have let every pull request through. detect_changes.yml's example now shows the same condition. - Run it when a draft is marked ready for review, which kept the skipped check green until the next push. - Queue the pull request web build's comment jobs in one group, so a late link comment can't overwrite "removed". - Note in CLAUDE.md which jobs need the static-IP runners. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Web build (design-system): removed. |
bot-commit at #271's merge pins its own github-script by SHA, and the minted token only gets `contents: write`, all bot-commit needs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Why
Since the move to the static-IP
github-public-amd64group, every Linux job is billed per minute. The org IP allow list refusesGITHUB_TOKENgit pushes and GitHub API calls from standard runners, but not git reads of this public repository. Probes onubuntu-latestagainst the static-IP group (run 1, run 2): git fetch andactions/checkoutwith the token succeed, whilegit push --dry-run, an API write, an API read of issue comments andbot-commitare refused with the allow-list error. GCP auth through OIDC works from both. So jobs that only check out and build can keepactions/checkouton free runners, without the hand-written anonymous checkout of #270; jobs that call the GitHub API stay on the static IPs.This is the split Android already ships: the shared conventions (GetStream/stream-build-conventions-android#114, v1.5.0) run build, unit tests, static checks and SDK sizes on
ubuntu-latestwith plainactions/checkout, and keep only the jobs that write to GitHub (size comments, PR checklist, stale PRs, release,gh-pages) on the static-IP group (e.g. GetStream/stream-feeds-android#254). Ourwindowsthumbnail job already checks out with the token onwindows-latest.Changes
ubuntu-latest:analyze,test; the threepanajobs; thumbnailandroid,linux,web;analyze_legacy_version;analyze_beta_versions; style-guidecheck.testandupdate_goldensboth run onubuntu-latest, withupdate_goldenshanding the PNGs to a small static-IP job that commits them withbot-commit.iosandmacosback tomacos-latestfromscaleway-macos(ci(repo): use Scaleway macOS runners for IP allow list compatibility #263 moved them on the same assumption).ubuntu-latest; the PR comment runs in small follow-up jobs on the static-IP group, as in stream-video-flutter.detect_changes.yml: a reusable workflow that tells whether a pull request or push changes any of a list of globs, diffing with git onubuntu-latestinstead of the GitHub API thatdorny/paths-filtercalls.legacy_version_analyze's gate is the first caller.persist-credentials: falseon every checkout except the two thatgit pushwith the stored token (publish_gallerygh-pages,release_tagtags).checkout@v3/@v4bumped tov6..github/actions/*: one groupedgithub-actionsPR a week, same shape as stream-chat-flutter, with a 7-day cooldown on new releases.pull-requests: readdropped where nothing reads pull requests; Codecov uploads only the listed reports (disable_search).fetch-depth: 0from the moved analyze/test jobs; nothing reads history.bot-commitandflutter-web-pr-commentthe static-IP group, theflutter-webdeploy, remove and target actions any (Linux) runner.Validation
ubuntu-latest/macos-latest, including the legacy-analysis gate, andactionlintreports nothing new.pr_web_build, by labeling this PRbuildand removing it (deploy, remove): the preview deployed fromubuntu-latestand served, the link comment posted, then the build was removed and the comment updated.update_goldens, on a branch with one golden deleted: the render job onubuntu-latesthanded the goldens to the static-IP job, which committed exactly that file back, byte-identical.🤖 Generated with Claude Code