Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
8b74984
ci(repo): run read-only jobs on free standard runners
xsahil03x Nov 27, 2026
7d696a7
ci(repo): keep pinned actions current with Dependabot
xsahil03x Nov 27, 2026
f0dd155
ci(repo): build the iOS thumbnail example on a free macOS runner
xsahil03x Nov 27, 2026
df91fd3
ci(repo): build the macOS thumbnail example on a free macOS runner
xsahil03x Nov 27, 2026
d73ae00
ci(repo): note which runners the shared actions need
xsahil03x Nov 27, 2026
c932a81
ci(repo): let Dependabot update the composite actions' pins
xsahil03x Nov 27, 2026
0bb1dba
ci(repo): tighten token scopes and the coverage upload
xsahil03x Nov 27, 2026
0cf9fa5
ci(repo): compare goldens on the image that renders them
xsahil03x Nov 27, 2026
9f07c60
ci(repo): render goldens on a free runner pinned with the test job
xsahil03x Nov 27, 2026
515e263
ci(repo): render and compare goldens on ubuntu-latest
xsahil03x Nov 27, 2026
f69e443
ci(repo): build and deploy the gallery on free runners
xsahil03x Nov 27, 2026
688529f
ci(repo): add a reusable workflow that commits an artifact
xsahil03x Nov 27, 2026
c84e75b
ci(repo): name the new gallery and golden jobs like the other workflows
xsahil03x Nov 27, 2026
b844698
Merge remote-tracking branch 'origin/ci/standard-runners' into ci/com…
xsahil03x Nov 27, 2026
b3f3e34
ci(repo): name the reusable commit job
xsahil03x Nov 27, 2026
d70ad87
ci(repo): sign gh-pages deploys as the Actions bot, naming the source…
xsahil03x Nov 27, 2026
9782b46
ci(repo): stop publishing the gallery to GitHub Pages
xsahil03x Nov 27, 2026
c8a586f
ci(repo): run the legacy-analysis gate on a free runner
xsahil03x Nov 27, 2026
6033a43
ci(repo): detect the gate's package changes with a two-commit git diff
xsahil03x Nov 27, 2026
3331064
ci(repo): count files moved out of packages/ in the legacy-analysis gate
xsahil03x Nov 27, 2026
7ea042d
ci(repo): detect path changes with a reusable workflow on a free runner
xsahil03x Nov 27, 2026
0e1ff09
ci(repo): name the legacy-analysis gate and its steps like the other …
xsahil03x Nov 27, 2026
1d604e0
ci(repo): give every step an emoji name and every job a name
xsahil03x Nov 27, 2026
c572872
ci(repo): close gaps found reviewing the runner moves
xsahil03x Nov 27, 2026
3adce85
Merge remote-tracking branch 'origin/ci/standard-runners' into ci/com…
xsahil03x Nov 27, 2026
e31b333
docs(repo): point the CI runner notes at commit_artifact
xsahil03x Nov 27, 2026
aa6441c
Merge remote-tracking branch 'origin/main' into ci/commit-artifact-wo…
xsahil03x Nov 27, 2026
2019a2c
ci(repo): pin commit_artifact's bot-commit to #271 and scope its token
xsahil03x Nov 27, 2026
b8fcf2c
ci(repo): name update_goldens' checkout and bootstrap steps like the …
xsahil03x Nov 27, 2026
3586351
ci(repo): bound update_goldens' render job and replace older runs on …
xsahil03x Nov 27, 2026
8e96623
Merge remote-tracking branch 'origin/main' into ci/commit-artifact-wo…
xsahil03x Nov 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 105 additions & 0 deletions .github/workflows/commit_artifact.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: commit_artifact

# Commits files that an earlier job of the calling run uploaded as an artifact,
# through bot-commit and the CI bot's app token. Lets the heavy work run on a
# free runner: only this job calls the GitHub API, which the org IP allow list
# permits from the static-IP runners alone.
#
# The artifact must keep each file's path from the repository root. An
# upload-artifact `path` that starts with a wildcard, such as
# `**/test/**/goldens/**/*.png`, does.
#
# commit:
# needs: render
# uses: GetStream/stream-core-flutter/.github/workflows/commit_artifact.yml@<sha>
# with:
# artifact: goldens
# files: "**/test/**/goldens/**/*.png"
# message: "chore: update goldens"
# client-id: ${{ vars.FLUTTER_CI_BOT_CLIENT_ID }}
# secrets:
# private-key: ${{ secrets.FLUTTER_CI_BOT_PRIVATE_KEY }}

on:
workflow_call:
inputs:
artifact:
description: The artifact of the calling run that holds the files.
type: string
required: true
files:
description: The files that may be committed, as bot-commit's `files`.
type: string
required: true
message:
description: The commit message; lines after the first become its body.
type: string
required: true
client-id:
description: The client ID of the GitHub App that commits.
type: string
required: true
branch:
description: The branch to commit to. Defaults to the pull request's head branch, or the run's branch.
type: string
required: false
default: ""
expected-head-sha:
description: The commit the files were made on; nothing is committed if the branch moved past it.
type: string
required: false
default: ""
secrets:
private-key:
description: The private key of the GitHub App that commits.
required: true
outputs:
changed:
description: "`true` when there was something to commit."
value: ${{ jobs.commit.outputs.changed }}
commit:
description: The new commit; empty when there was nothing to commit or the branch moved.
value: ${{ jobs.commit.outputs.commit }}
moved:
description: "`true` when the branch moved past `expected-head-sha`, so nothing was committed."
value: ${{ jobs.commit.outputs.moved }}

permissions:
contents: read

jobs:
commit:
name: Commit Files
runs-on:
group: github-public-amd64
timeout-minutes: 5
outputs:
changed: ${{ steps.commit.outputs.changed }}
commit: ${{ steps.commit.outputs.commit }}
moved: ${{ steps.commit.outputs.moved }}
steps:
- name: 🔑 Mint CI Bot Token
id: ci-bot-token
uses: actions/create-github-app-token@f418cff399f7aef4c2f0ad47e25ca7a6abbdd6fc # v3.4.0
with:
client-id: ${{ inputs.client-id }}
private-key: ${{ secrets.private-key }}
# Only what bot-commit needs, whatever else the app may do.
permission-contents: write

- name: 📥 Download Files
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
name: ${{ inputs.artifact }}

# By repository path: `./` would resolve against the calling repository.
- name: 📤 Commit
id: commit
uses: GetStream/stream-core-flutter/.github/actions/bot-commit@ab35fa04fb78eabde311daabadc4ecccdbbd677e
with:
files: ${{ inputs.files }}
message: ${{ inputs.message }}
token: ${{ steps.ci-bot-token.outputs.token }}
branch: ${{ inputs.branch || github.head_ref || github.ref_name }}
expected-head-sha: ${{ inputs.expected-head-sha || github.event.pull_request.head.sha || github.sha }}
detect-changes: "false"
50 changes: 17 additions & 33 deletions .github/workflows/update_goldens.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,21 @@ on: workflow_dispatch
permissions:
contents: read

# A newer run on the same branch replaces an older one; the older one's commit
# would be refused anyway once the branch moves.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
# Renders on a free runner, the one `test` in stream_core_flutter_workflow.yml
# compares on; change both together.
render:
name: Render Goldens
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: 📚 Checkout branch
- name: 📚 Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
Expand All @@ -28,7 +35,7 @@ jobs:
- name: 📦 Install Tools
run: flutter pub global activate melos

- name: 🔧 Bootstrap Workspace
- name: 🧩 Bootstrap Workspace
run: melos bootstrap --verbose

- name: 🖼️ Update Goldens
Expand All @@ -43,37 +50,14 @@ jobs:
if-no-files-found: error
retention-days: 1

# Committing calls the GitHub API, which the org IP allow list only permits
# from the static-IP runners.
commit:
name: Commit Goldens
needs: render
runs-on:
group: github-public-amd64
steps:
- name: 🔑 Mint CI Bot Token
id: ci-bot-token
uses: actions/create-github-app-token@f418cff399f7aef4c2f0ad47e25ca7a6abbdd6fc # v3.4.0
with:
client-id: ${{ vars.FLUTTER_CI_BOT_CLIENT_ID }}
private-key: ${{ secrets.FLUTTER_CI_BOT_PRIVATE_KEY }}

# Only for the local bot-commit action.
- name: 📚 Checkout actions
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
sparse-checkout: .github/actions

- name: 📥 Download Goldens
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
name: goldens

- name: 📤 Commit Changes
uses: ./.github/actions/bot-commit
with:
files: "**/test/**/goldens/**/*.png"
message: "chore: Update Goldens"
token: ${{ steps.ci-bot-token.outputs.token }}
detect-changes: "false"
uses: ./.github/workflows/commit_artifact.yml
with:
artifact: goldens
files: "**/test/**/goldens/**/*.png"
message: "chore: Update Goldens"
client-id: ${{ vars.FLUTTER_CI_BOT_CLIENT_ID }}
secrets:
private-key: ${{ secrets.FLUTTER_CI_BOT_PRIVATE_KEY }}
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ file-type assets.
The `GetStream` organization has an IP allow list, and it refuses every GitHub API call made with a token from GitHub's standard runners (`ubuntu-latest`, `macos-latest`), reads included; pushing with git is refused too. Checking out (a git read) and OIDC sign-in (Codecov, the Google Cloud deploys) work there. So:

- A job that only checks out, builds, tests or deploys outside GitHub runs on a free standard runner.
- A job that calls the GitHub API, or pushes, runs on the static-IP group (`runs-on: { group: github-public-amd64 }`), which is billed per minute. Keep it small: do the heavy work in a free job and hand the result over, as `update_goldens.yml` and `pr_web_build.yml` do. `bot-commit` and `flutter-web-pr-comment` are such calls.
- A job that calls the GitHub API, or pushes, runs on the static-IP group (`runs-on: { group: github-public-amd64 }`), which is billed per minute. Keep it small: do the heavy work in a free job and hand the result over, as `update_goldens.yml` and `pr_web_build.yml` do. `bot-commit` and `flutter-web-pr-comment` are such calls; to commit files a free job made, upload them as an artifact and call the reusable `commit_artifact.yml`.
- To skip work for unrelated changes, use the reusable `detect_changes.yml`, which diffs with git, not `dorny/paths-filter`, which calls the API on pull requests. A gate's dependent job should still run when the gate fails, since a skipped required check passes; see the example in its header.

Pin every action to a full commit SHA with its version in a comment; Dependabot (`.github/dependabot.yml`) bumps them weekly.
Expand Down