From 8b749846337a2677a73efb5de02666e97baf8214 Mon Sep 17 00:00:00 2001 From: Sahil Kumar Date: Fri, 27 Nov 2026 14:29:55 +0100 Subject: [PATCH 01/27] ci(repo): run read-only jobs on free standard runners 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 --- .github/actions/bootstrap/action.yml | 2 +- .github/actions/bot-commit/action.yml | 2 +- .github/actions/flutter-web-deploy/action.yml | 4 +-- .../actions/flutter-web-pr-comment/action.yml | 2 +- .github/actions/flutter-web-remove/action.yml | 4 +-- .github/actions/pana/action.yml | 4 +-- .github/workflows/beta_version_analyze.yml | 11 +++---- .github/workflows/legacy_version_analyze.yml | 15 +++++---- .github/workflows/pana.yml | 21 +++++++----- .github/workflows/pr_review_labels.yml | 4 +-- .github/workflows/pr_title.yml | 6 ++-- .github/workflows/pr_version_labels.yml | 2 +- .github/workflows/pr_web_build.yml | 7 ++-- .github/workflows/publish_gallery.yml | 10 +++--- .github/workflows/release_publish.yml | 15 +++++---- .github/workflows/release_tag.yml | 6 ++-- .../stream_core_flutter_workflow.yml | 20 +++++------ .../stream_thumbnail_native_builds.yml | 33 ++++++++++++------- .github/workflows/sync_style_guides.yml | 22 ++++++++----- .github/workflows/update_goldens.yml | 6 ++-- .../workflows/update_top_level_domains.yml | 10 +++--- 21 files changed, 115 insertions(+), 91 deletions(-) diff --git a/.github/actions/bootstrap/action.yml b/.github/actions/bootstrap/action.yml index b061361fd..9c2993729 100644 --- a/.github/actions/bootstrap/action.yml +++ b/.github/actions/bootstrap/action.yml @@ -16,7 +16,7 @@ runs: using: composite steps: - name: Install Flutter - uses: subosito/flutter-action@v2 + uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 # v2.23.0 with: cache: true cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }} diff --git a/.github/actions/bot-commit/action.yml b/.github/actions/bot-commit/action.yml index 3efe8f42b..0eb590044 100644 --- a/.github/actions/bot-commit/action.yml +++ b/.github/actions/bot-commit/action.yml @@ -52,7 +52,7 @@ runs: steps: - name: ๐Ÿ“ค Commit through the API id: commit - uses: actions/github-script@v9 + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: FILES: ${{ inputs.files }} MESSAGE: ${{ inputs.message }} diff --git a/.github/actions/flutter-web-deploy/action.yml b/.github/actions/flutter-web-deploy/action.yml index eb1a25f9f..fc9fca94a 100644 --- a/.github/actions/flutter-web-deploy/action.yml +++ b/.github/actions/flutter-web-deploy/action.yml @@ -35,13 +35,13 @@ runs: fi - name: ๐Ÿ”‘ Authenticate to Google Cloud - uses: google-github-actions/auth@v3 + uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3.0.0 with: workload_identity_provider: projects/675676272957/locations/global/workloadIdentityPools/github-actions/providers/github-flutter service_account: ${{ inputs.service-account }} - name: โ˜๏ธ Setup gcloud - uses: google-github-actions/setup-gcloud@v3 + uses: google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db # v3.0.1 # A prod folder holds the beta build in beta/ and the pull request builds # in pr/, so the sync leaves those alone. diff --git a/.github/actions/flutter-web-pr-comment/action.yml b/.github/actions/flutter-web-pr-comment/action.yml index 9355c6923..73cd6c1f1 100644 --- a/.github/actions/flutter-web-pr-comment/action.yml +++ b/.github/actions/flutter-web-pr-comment/action.yml @@ -22,7 +22,7 @@ runs: using: composite steps: - name: ๐Ÿ’ฌ Comment the Link - uses: actions/github-script@v9 + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: APP: ${{ inputs.app }} URL: ${{ inputs.url }} diff --git a/.github/actions/flutter-web-remove/action.yml b/.github/actions/flutter-web-remove/action.yml index cec1e9a03..2df259bec 100644 --- a/.github/actions/flutter-web-remove/action.yml +++ b/.github/actions/flutter-web-remove/action.yml @@ -29,13 +29,13 @@ runs: fi - name: ๐Ÿ”‘ Authenticate to Google Cloud - uses: google-github-actions/auth@v3 + uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3.0.0 with: workload_identity_provider: projects/675676272957/locations/global/workloadIdentityPools/github-actions/providers/github-flutter service_account: ${{ inputs.service-account }} - name: โ˜๏ธ Setup gcloud - uses: google-github-actions/setup-gcloud@v3 + uses: google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db # v3.0.1 # Syncing an empty folder deletes every object of the build, and passes # when there is none. diff --git a/.github/actions/pana/action.yml b/.github/actions/pana/action.yml index 7de52eec1..a6a662b34 100644 --- a/.github/actions/pana/action.yml +++ b/.github/actions/pana/action.yml @@ -23,13 +23,13 @@ runs: # Pana resolves the package on its own, so a dependency on a sibling package would come from pub.dev and miss # the changes in this checkout. Point it at the sibling's directory instead. - name: Resolve Sibling Packages From The Checkout - uses: mikefarah/yq@v4 + uses: mikefarah/yq@f2944b823f84906a127dbd29e4c2a3e60c4e550e # v4.54.3 with: cmd: | yq eval '(.dependencies | select(has("stream_core")) | .stream_core) = {"path": "../stream_core"}' -i packages/stream_core_flutter/pubspec.yaml - name: Install Flutter - uses: subosito/flutter-action@v2 + uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 # v2.23.0 with: cache: true channel: stable diff --git a/.github/workflows/beta_version_analyze.yml b/.github/workflows/beta_version_analyze.yml index b1465587f..5487ad9ae 100644 --- a/.github/workflows/beta_version_analyze.yml +++ b/.github/workflows/beta_version_analyze.yml @@ -13,16 +13,15 @@ jobs: # Does a sanity check on packages for the next beta version so we are not surprised by any breaking changes. analyze_beta_versions: timeout-minutes: 15 - runs-on: - group: github-public-amd64 + runs-on: ubuntu-latest steps: - name: "Git Checkout" - uses: actions/checkout@v4 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 with: - fetch-depth: 0 + persist-credentials: false - name: "Install Flutter" - uses: subosito/flutter-action@v2 + uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 # v2.23.0 with: channel: beta cache: true @@ -38,7 +37,7 @@ jobs: needs: [analyze_beta_versions] if: failure() && github.event_name == 'schedule' steps: - - uses: 8398a7/action-slack@v3 + - uses: 8398a7/action-slack@77eaa4f1c608a7d68b38af4e3f739dcd8cba273e # v3 with: status: failure text: "<@U08BMRSM8G5> & <@U05UCQ2B0CT>: The beta build for Flutter Video failed. Please check the logs." diff --git a/.github/workflows/legacy_version_analyze.yml b/.github/workflows/legacy_version_analyze.yml index 86ccf4198..3f2211ddd 100644 --- a/.github/workflows/legacy_version_analyze.yml +++ b/.github/workflows/legacy_version_analyze.yml @@ -38,10 +38,12 @@ jobs: # paths-filter diffs against git history on push events, so it needs a # checkout there. On pull requests it uses the API instead. - name: "Git Checkout" - uses: actions/checkout@v4 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 + with: + persist-credentials: false - name: "Detect Path Changes" - uses: dorny/paths-filter@v4 + uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3 id: filter with: filters: | @@ -58,16 +60,15 @@ jobs: needs: gate if: needs.gate.outputs.should_run == 'true' timeout-minutes: 15 - runs-on: - group: github-public-amd64 + runs-on: ubuntu-latest steps: - name: "Git Checkout" - uses: actions/checkout@v3 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 with: - fetch-depth: 0 + persist-credentials: false - name: "Install Flutter" - uses: subosito/flutter-action@v2 + uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 # v2.23.0 with: cache: true flutter-version: ${{ env.flutter_version }} diff --git a/.github/workflows/pana.yml b/.github/workflows/pana.yml index b042e5ea3..d4194673e 100644 --- a/.github/workflows/pana.yml +++ b/.github/workflows/pana.yml @@ -18,11 +18,12 @@ permissions: jobs: stream_core: - runs-on: - group: github-public-amd64 + runs-on: ubuntu-latest steps: - name: ๐Ÿ“š Git Checkout - uses: actions/checkout@v4 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 + with: + persist-credentials: false - name: ๐Ÿ“Š Verify Pana Score uses: ./.github/actions/pana with: @@ -30,11 +31,12 @@ jobs: min_score: 120 # Missing 10 points for no example, 10 points for no license, 10 points for static analysis issues, and 10 points for outdated dependencies (cross_file 0.4.0 requires Flutter). stream_core_flutter: - runs-on: - group: github-public-amd64 + runs-on: ubuntu-latest steps: - name: ๐Ÿ“š Git Checkout - uses: actions/checkout@v4 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 + with: + persist-credentials: false - name: ๐Ÿ“Š Verify Pana Score uses: ./.github/actions/pana with: @@ -42,11 +44,12 @@ jobs: min_score: 110 # Missing 10 points for no license, 10 points for no example, 20 points for static analysis issues (including the path dependency on stream_core that the pana action sets up), and 10 points for outdated dependencies (shimmer 4.0.0). stream_thumbnail: - runs-on: - group: github-public-amd64 + runs-on: ubuntu-latest steps: - name: ๐Ÿ“š Git Checkout - uses: actions/checkout@v4 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 + with: + persist-credentials: false - name: ๐Ÿ“Š Verify Pana Score uses: ./.github/actions/pana with: diff --git a/.github/workflows/pr_review_labels.yml b/.github/workflows/pr_review_labels.yml index 4bdb44321..ea716c9f3 100644 --- a/.github/workflows/pr_review_labels.yml +++ b/.github/workflows/pr_review_labels.yml @@ -40,7 +40,7 @@ jobs: timeout-minutes: 5 steps: - name: ๐Ÿท๏ธ Remove Pending - uses: actions/github-script@v9 + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 with: script: | const { owner, repo } = context.repo; @@ -88,7 +88,7 @@ jobs: timeout-minutes: 5 steps: - name: ๐Ÿท๏ธ Sync Review Labels - uses: actions/github-script@v9 + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 with: script: | const READY = 'ready'; diff --git a/.github/workflows/pr_title.yml b/.github/workflows/pr_title.yml index 523faeebe..5e59674ea 100644 --- a/.github/workflows/pr_title.yml +++ b/.github/workflows/pr_title.yml @@ -25,7 +25,7 @@ jobs: runs-on: group: github-public-amd64 steps: - - uses: amannn/action-semantic-pull-request@v5.5.3 + - uses: amannn/action-semantic-pull-request@0723387faaf9b38adef4775cd42cfd5155ed6017 # v5.5.3 with: scopes: | llc @@ -41,7 +41,7 @@ jobs: runs-on: group: github-public-amd64 steps: - - uses: GetStream/verify-semantic-changelog-update@v1.1.0 + - uses: GetStream/verify-semantic-changelog-update@566b49e5ce5f180280336053428f7e2338a4d496 # v1.1.0 with: scopes: | { @@ -59,4 +59,4 @@ jobs: runs-on: group: github-public-amd64 steps: - - uses: GetStream/verify-semantic-changelog-update/placement@v1.1.0 + - uses: GetStream/verify-semantic-changelog-update/placement@566b49e5ce5f180280336053428f7e2338a4d496 # v1.1.0 diff --git a/.github/workflows/pr_version_labels.yml b/.github/workflows/pr_version_labels.yml index 05443dfb4..7ebb383a3 100644 --- a/.github/workflows/pr_version_labels.yml +++ b/.github/workflows/pr_version_labels.yml @@ -43,7 +43,7 @@ jobs: timeout-minutes: 5 steps: - name: ๐Ÿท๏ธ Label Version - uses: actions/github-script@v9 + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: VERSION_FILE: ${{ inputs.version-file }} with: diff --git a/.github/workflows/pr_web_build.yml b/.github/workflows/pr_web_build.yml index df83a2960..7ef682ac6 100644 --- a/.github/workflows/pr_web_build.yml +++ b/.github/workflows/pr_web_build.yml @@ -49,7 +49,9 @@ jobs: pull-requests: write steps: - name: ๐Ÿ“š Checkout - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 + with: + persist-credentials: false - name: ๐Ÿงฉ Bootstrap Workspace uses: ./.github/actions/bootstrap @@ -105,8 +107,9 @@ jobs: # Only for the local actions; other repositories use them without a # checkout. - name: ๐Ÿ“š Checkout - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 with: + persist-credentials: false sparse-checkout: .github/actions - name: ๐ŸŽฏ Target diff --git a/.github/workflows/publish_gallery.yml b/.github/workflows/publish_gallery.yml index 8e4beb778..16f4916bd 100644 --- a/.github/workflows/publish_gallery.yml +++ b/.github/workflows/publish_gallery.yml @@ -33,7 +33,7 @@ jobs: contents: write steps: - name: Checkout code - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 with: fetch-depth: 0 @@ -43,7 +43,7 @@ jobs: git config --global user.name "$(git log --format='%an' HEAD^!)" - name: Setup Flutter - uses: subosito/flutter-action@v2 + uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 # v2.23.0 with: channel: ${{ env.FLUTTER_CHANNEL }} flutter-version: ${{ env.FLUTTER_VERSION }} @@ -55,7 +55,7 @@ jobs: run: melos bootstrap - name: Build and Deploy - uses: bluefireteam/flutter-gh-pages@v9 + uses: bluefireteam/flutter-gh-pages@cf4a9312849577dbfd9df8f3d63d12ef6b09898e # v9 with: baseHref: /stream-core-flutter/ workingDir: apps/design_system_gallery @@ -76,7 +76,9 @@ jobs: id-token: write steps: - name: ๐Ÿ“š Checkout - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 + with: + persist-credentials: false - name: ๐Ÿงฉ Bootstrap Workspace uses: ./.github/actions/bootstrap diff --git a/.github/workflows/release_publish.yml b/.github/workflows/release_publish.yml index 9ca76f57c..3ae29d271 100644 --- a/.github/workflows/release_publish.yml +++ b/.github/workflows/release_publish.yml @@ -30,8 +30,9 @@ jobs: - name: ๐Ÿ“š Checkout branch # Default GITHUB_TOKEN: this job never pushes to git (the release step # passes its own token), so no bot PAT sits in git config during setup. - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 with: + persist-credentials: false fetch-depth: 0 - name: ๐Ÿท๏ธ Parse package and version from tag @@ -78,10 +79,10 @@ jobs: - name: ๐ŸŽฏ Setup Dart # Before Flutter: provides the pub.dev OIDC token. - uses: dart-lang/setup-dart@v1 + uses: dart-lang/setup-dart@2286a0c042b44434fe26d292bbce8d34f7ec662b # v1.8.2 - name: ๐Ÿฆ Install Flutter - uses: subosito/flutter-action@v2 + uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 # v2.23.0 with: channel: stable @@ -204,13 +205,13 @@ jobs: - name: ๐Ÿ”‘ Mint CI Bot Token id: ci-bot-token - uses: actions/create-github-app-token@v3 + 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 }} - name: ๐Ÿš€ Create GitHub Release - uses: softprops/action-gh-release@v3 + uses: softprops/action-gh-release@8a0cd651e5b2365bd640854a3fa5dfc70e4875f3 # v3.0.4 with: tag_name: ${{ github.ref_name }} name: ${{ steps.parse.outputs.package }} v${{ steps.parse.outputs.version }} @@ -241,7 +242,9 @@ jobs: id-token: write steps: - name: ๐Ÿ“š Checkout - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 + with: + persist-credentials: false - name: ๐Ÿงฉ Bootstrap Workspace uses: ./.github/actions/bootstrap diff --git a/.github/workflows/release_tag.yml b/.github/workflows/release_tag.yml index 734fd6cb1..5e249ef80 100644 --- a/.github/workflows/release_tag.yml +++ b/.github/workflows/release_tag.yml @@ -22,20 +22,20 @@ jobs: steps: - name: ๐Ÿ”‘ Mint CI Bot Token id: ci-bot-token - uses: actions/create-github-app-token@v3 + 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 }} - name: ๐Ÿ“š Checkout branch # CI bot app token: GITHUB_TOKEN tag pushes don't trigger the publish workflow. - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 with: fetch-depth: 0 token: ${{ steps.ci-bot-token.outputs.token }} - name: ๐Ÿฆ Install Flutter - uses: subosito/flutter-action@v2 + uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 # v2.23.0 with: channel: stable diff --git a/.github/workflows/stream_core_flutter_workflow.yml b/.github/workflows/stream_core_flutter_workflow.yml index ff64a9f0e..4728d5db1 100644 --- a/.github/workflows/stream_core_flutter_workflow.yml +++ b/.github/workflows/stream_core_flutter_workflow.yml @@ -26,18 +26,17 @@ permissions: jobs: analyze: timeout-minutes: 15 - runs-on: - group: github-public-amd64 + runs-on: ubuntu-latest env: IS_CI: 'true' steps: - name: Git Checkout - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 with: - fetch-depth: 0 + persist-credentials: false - name: Install Flutter - uses: subosito/flutter-action@v2 + uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 # v2.23.0 with: cache: true cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }} @@ -66,8 +65,7 @@ jobs: test: needs: analyze timeout-minutes: 15 - runs-on: - group: github-public-amd64 + runs-on: ubuntu-latest permissions: contents: read pull-requests: read @@ -77,12 +75,12 @@ jobs: IS_CI: 'true' steps: - name: Git Checkout - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 with: - fetch-depth: 0 + persist-credentials: false - name: Install Flutter - uses: subosito/flutter-action@v2 + uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 # v2.23.0 with: cache: true cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }} @@ -103,7 +101,7 @@ jobs: run: melos run coverage:ignore-file --no-select - name: Upload Coverage - uses: codecov/codecov-action@v5 + uses: codecov/codecov-action@0fb7174895f61a3b6b78fc075e0cd60383518dac # v5.5.5 with: use_oidc: true files: packages/*/coverage/lcov.info diff --git a/.github/workflows/stream_thumbnail_native_builds.yml b/.github/workflows/stream_thumbnail_native_builds.yml index 7b9bfdfe9..ea7657f7c 100644 --- a/.github/workflows/stream_thumbnail_native_builds.yml +++ b/.github/workflows/stream_thumbnail_native_builds.yml @@ -33,14 +33,15 @@ permissions: jobs: android: timeout-minutes: 20 - runs-on: - group: github-public-amd64 + runs-on: ubuntu-latest defaults: run: working-directory: packages/stream_thumbnail/example steps: - name: Git Checkout - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 + with: + persist-credentials: false - name: Bootstrap Workspace uses: ./.github/actions/bootstrap @@ -58,7 +59,9 @@ jobs: working-directory: packages/stream_thumbnail/example steps: - name: Git Checkout - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 + with: + persist-credentials: false - name: Bootstrap Workspace uses: ./.github/actions/bootstrap @@ -76,7 +79,9 @@ jobs: working-directory: packages/stream_thumbnail/example steps: - name: Git Checkout - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 + with: + persist-credentials: false - name: Bootstrap Workspace uses: ./.github/actions/bootstrap @@ -94,7 +99,9 @@ jobs: working-directory: packages/stream_thumbnail/example steps: - name: Git Checkout - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 + with: + persist-credentials: false - name: Bootstrap Workspace uses: ./.github/actions/bootstrap @@ -106,14 +113,15 @@ jobs: linux: timeout-minutes: 20 - runs-on: - group: github-public-amd64 + runs-on: ubuntu-latest defaults: run: working-directory: packages/stream_thumbnail/example steps: - name: Git Checkout - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 + with: + persist-credentials: false - name: Install Linux Build Dependencies run: | @@ -130,14 +138,15 @@ jobs: web: timeout-minutes: 20 - runs-on: - group: github-public-amd64 + runs-on: ubuntu-latest defaults: run: working-directory: packages/stream_thumbnail/example steps: - name: Git Checkout - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 + with: + persist-credentials: false - name: Bootstrap Workspace uses: ./.github/actions/bootstrap diff --git a/.github/workflows/sync_style_guides.yml b/.github/workflows/sync_style_guides.yml index 69c9fca53..2b9f7518b 100644 --- a/.github/workflows/sync_style_guides.yml +++ b/.github/workflows/sync_style_guides.yml @@ -30,14 +30,15 @@ jobs: # The guides are copied into repositories that have none of this repo's # other files, so a link out of `style_guides/` must fail before merge. check: - runs-on: - group: github-public-amd64 + runs-on: ubuntu-latest steps: - name: ๐Ÿ“š Git Checkout - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 + with: + persist-credentials: false - name: ๐ŸŽฏ Install Dart - uses: dart-lang/setup-dart@v1 + uses: dart-lang/setup-dart@2286a0c042b44434fe26d292bbce8d34f7ec662b # v1.8.2 - name: ๐Ÿ”— Check Guide Links run: dart run scripts/sync_style_guides.dart --check @@ -61,13 +62,15 @@ jobs: branch: main steps: - name: ๐Ÿ“š Git Checkout - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 + with: + persist-credentials: false # An app token covers only the repositories it is minted for, so each # job asks for its own target rather than this repository. - name: ๐Ÿ”‘ Mint CI Bot Token id: ci-bot-token - uses: actions/create-github-app-token@v3 + 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 }} @@ -75,15 +78,16 @@ jobs: repositories: ${{ matrix.repository }} - name: ๐Ÿ“š Checkout ${{ matrix.repository }} - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 with: + persist-credentials: false repository: ${{ github.repository_owner }}/${{ matrix.repository }} ref: ${{ matrix.branch }} path: target token: ${{ steps.ci-bot-token.outputs.token }} - name: ๐ŸŽฏ Install Dart - uses: dart-lang/setup-dart@v1 + uses: dart-lang/setup-dart@2286a0c042b44434fe26d292bbce8d34f7ec662b # v1.8.2 - name: ๐Ÿ“ Copy Style Guides run: dart run scripts/sync_style_guides.dart target @@ -93,7 +97,7 @@ jobs: # opened when the copy is already up to date, and an open sync PR is # updated in place rather than duplicated. - name: ๐Ÿ“ค Open Pull Request - uses: peter-evans/create-pull-request@v7 + uses: peter-evans/create-pull-request@22a9089034f40e5a961c8808d113e2c98fb63676 # v7.0.11 with: path: target token: ${{ steps.ci-bot-token.outputs.token }} diff --git a/.github/workflows/update_goldens.yml b/.github/workflows/update_goldens.yml index 5c3c42f3a..4237ed235 100644 --- a/.github/workflows/update_goldens.yml +++ b/.github/workflows/update_goldens.yml @@ -12,18 +12,18 @@ jobs: steps: - name: ๐Ÿ”‘ Mint CI Bot Token id: ci-bot-token - uses: actions/create-github-app-token@v3 + 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 }} - name: ๐Ÿ“š Checkout branch - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 with: persist-credentials: false - name: ๐Ÿฆ Install Flutter - uses: subosito/flutter-action@v2 + uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 # v2.23.0 with: flutter-version: "3.x" channel: stable diff --git a/.github/workflows/update_top_level_domains.yml b/.github/workflows/update_top_level_domains.yml index a3df8a002..da1e1e679 100644 --- a/.github/workflows/update_top_level_domains.yml +++ b/.github/workflows/update_top_level_domains.yml @@ -15,10 +15,12 @@ jobs: group: github-public-amd64 steps: - name: ๐Ÿ“š Git Checkout - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 + with: + persist-credentials: false - name: ๐ŸŽฏ Install Dart - uses: dart-lang/setup-dart@v1 + uses: dart-lang/setup-dart@2286a0c042b44434fe26d292bbce8d34f7ec662b # v1.8.2 # Leaves the file as it is when the list of domains has not changed, so # no pull request is opened then. @@ -27,7 +29,7 @@ jobs: - name: ๐Ÿ”‘ Mint CI Bot Token id: ci-bot-token - uses: actions/create-github-app-token@v3 + 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 }} @@ -35,7 +37,7 @@ jobs: # Opened with the CI bot's app token so the pull request's checks run, which # they don't for one opened with the workflow's own token. - name: ๐Ÿ“ค Open Pull Request - uses: peter-evans/create-pull-request@v7 + uses: peter-evans/create-pull-request@22a9089034f40e5a961c8808d113e2c98fb63676 # v7.0.11 with: token: ${{ steps.ci-bot-token.outputs.token }} branch: chore/update-top-level-domains From 7d696a7924189600e113a7892ced5857ac1e4910 Mon Sep 17 00:00:00 2001 From: Sahil Kumar Date: Fri, 27 Nov 2026 14:34:25 +0100 Subject: [PATCH 02/27] ci(repo): keep pinned actions current with Dependabot Co-Authored-By: Claude Opus 5.5 --- .github/dependabot.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..3610b577c --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,17 @@ +# Keeps the SHA-pinned actions in workflows and local composite actions current. +# See https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file + +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + # A release must be a week old before it is proposed, so a compromised one has time to be caught. + cooldown: + default-days: 7 + groups: + all-actions: + patterns: ["*"] + commit-message: + prefix: "chore(deps)" From f0dd155c68f47b4cb1142c879d4dbd58f1308c49 Mon Sep 17 00:00:00 2001 From: Sahil Kumar Date: Fri, 27 Nov 2026 14:40:32 +0100 Subject: [PATCH 03/27] ci(repo): build the iOS thumbnail example on a free macOS runner 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 --- .github/workflows/stream_thumbnail_native_builds.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/stream_thumbnail_native_builds.yml b/.github/workflows/stream_thumbnail_native_builds.yml index ea7657f7c..ef8589b31 100644 --- a/.github/workflows/stream_thumbnail_native_builds.yml +++ b/.github/workflows/stream_thumbnail_native_builds.yml @@ -53,7 +53,7 @@ jobs: ios: timeout-minutes: 20 - runs-on: { group: scaleway-macos } + runs-on: macos-latest defaults: run: working-directory: packages/stream_thumbnail/example From df91fd3af09b732e390868d71f53dac3e3dc40c9 Mon Sep 17 00:00:00 2001 From: Sahil Kumar Date: Fri, 27 Nov 2026 14:41:11 +0100 Subject: [PATCH 04/27] ci(repo): build the macOS thumbnail example on a free macOS runner 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 --- .github/workflows/stream_thumbnail_native_builds.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/stream_thumbnail_native_builds.yml b/.github/workflows/stream_thumbnail_native_builds.yml index ef8589b31..5e90d86d6 100644 --- a/.github/workflows/stream_thumbnail_native_builds.yml +++ b/.github/workflows/stream_thumbnail_native_builds.yml @@ -73,7 +73,7 @@ jobs: macos: timeout-minutes: 20 - runs-on: { group: scaleway-macos } + runs-on: macos-latest defaults: run: working-directory: packages/stream_thumbnail/example From d73ae00fc5d9c7cef8207d7f497fe80509df0a4f Mon Sep 17 00:00:00 2001 From: Sahil Kumar Date: Fri, 27 Nov 2026 14:52:54 +0100 Subject: [PATCH 05/27] ci(repo): note which runners the shared actions need 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 --- .github/actions/bot-commit/action.yml | 3 +++ .github/actions/flutter-web-deploy/action.yml | 3 ++- .github/actions/flutter-web-pr-comment/action.yml | 3 ++- .github/actions/flutter-web-remove/action.yml | 3 ++- .github/actions/flutter-web-target/action.yml | 2 ++ 5 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/actions/bot-commit/action.yml b/.github/actions/bot-commit/action.yml index 0eb590044..58f2824c0 100644 --- a/.github/actions/bot-commit/action.yml +++ b/.github/actions/bot-commit/action.yml @@ -4,6 +4,9 @@ description: > signed by GitHub and attributed to the app whose token is used. The commit is refused if the branch moved past `expected-head-sha`. +# The job needs a runner in the static-IP group: the org IP allow list refuses +# its API calls from standard runners. + inputs: files: description: > diff --git a/.github/actions/flutter-web-deploy/action.yml b/.github/actions/flutter-web-deploy/action.yml index fc9fca94a..7df88260d 100644 --- a/.github/actions/flutter-web-deploy/action.yml +++ b/.github/actions/flutter-web-deploy/action.yml @@ -8,7 +8,8 @@ description: > # flutter-web-target names for the account: the identity provider only admits # runs in it. Fork pull requests can't deploy: their runs get no identity token. # It needs a Linux runner: the cleanup of old pull request builds uses GNU -# `date -d`. +# `date -d`. It makes no GitHub API call, so a standard runner such as +# `ubuntu-latest` works. inputs: path: diff --git a/.github/actions/flutter-web-pr-comment/action.yml b/.github/actions/flutter-web-pr-comment/action.yml index 73cd6c1f1..ca991f91d 100644 --- a/.github/actions/flutter-web-pr-comment/action.yml +++ b/.github/actions/flutter-web-pr-comment/action.yml @@ -3,7 +3,8 @@ description: > Comments the link to a pull request's web build on the pull request, or updates that comment when the build is removed. One comment per app. -# The job needs `pull-requests: write`. +# The job needs `pull-requests: write`, and a runner in the static-IP group: +# the org IP allow list refuses its API calls from standard runners. inputs: app: diff --git a/.github/actions/flutter-web-remove/action.yml b/.github/actions/flutter-web-remove/action.yml index 2df259bec..62a08b3bd 100644 --- a/.github/actions/flutter-web-remove/action.yml +++ b/.github/actions/flutter-web-remove/action.yml @@ -5,7 +5,8 @@ description: > when there is no build. # The job needs `id-token: write` and the GitHub environment `flutter-web-pr`: -# the identity provider only admits runs in it. +# the identity provider only admits runs in it. It makes no GitHub API call, so +# a standard runner such as `ubuntu-latest` works. inputs: path: diff --git a/.github/actions/flutter-web-target/action.yml b/.github/actions/flutter-web-target/action.yml index 24214a72e..7b8287a68 100644 --- a/.github/actions/flutter-web-target/action.yml +++ b/.github/actions/flutter-web-target/action.yml @@ -23,6 +23,8 @@ description: > # unset otherwise. Nothing removes a build's browser # storage, so an app can skip storing what grows, such as # an offline cache, in pull request builds. +# +# It makes no network call, so it runs on any runner. inputs: app: From c932a8100f45196a7ca420fecb0ec32a516c9a63 Mon Sep 17 00:00:00 2001 From: Sahil Kumar Date: Fri, 27 Nov 2026 14:58:41 +0100 Subject: [PATCH 06/27] ci(repo): let Dependabot update the composite actions' pins 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 --- .github/dependabot.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 3610b577c..99fae81a2 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,7 +4,10 @@ version: 2 updates: - package-ecosystem: "github-actions" - directory: "/" + # "/" covers only .github/workflows; the composite actions need their own entry. + directories: + - "/" + - "/.github/actions/*" schedule: interval: "weekly" # A release must be a week old before it is proposed, so a compromised one has time to be caught. From 0bb1dbaa70d5784b6cd1812f3df4a43ed2425572 Mon Sep 17 00:00:00 2001 From: Sahil Kumar Date: Fri, 27 Nov 2026 15:02:16 +0100 Subject: [PATCH 07/27] ci(repo): tighten token scopes and the coverage upload - 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 --- .github/workflows/beta_version_analyze.yml | 2 +- .github/workflows/pana.yml | 1 - .github/workflows/stream_core_flutter_workflow.yml | 3 +-- .github/workflows/stream_thumbnail_native_builds.yml | 1 - 4 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/beta_version_analyze.yml b/.github/workflows/beta_version_analyze.yml index 5487ad9ae..b1cde4838 100644 --- a/.github/workflows/beta_version_analyze.yml +++ b/.github/workflows/beta_version_analyze.yml @@ -37,7 +37,7 @@ jobs: needs: [analyze_beta_versions] if: failure() && github.event_name == 'schedule' steps: - - uses: 8398a7/action-slack@77eaa4f1c608a7d68b38af4e3f739dcd8cba273e # v3 + - uses: 8398a7/action-slack@77eaa4f1c608a7d68b38af4e3f739dcd8cba273e # v3.19.0 with: status: failure text: "<@U08BMRSM8G5> & <@U05UCQ2B0CT>: The beta build for Flutter Video failed. Please check the logs." diff --git a/.github/workflows/pana.yml b/.github/workflows/pana.yml index d4194673e..368170ede 100644 --- a/.github/workflows/pana.yml +++ b/.github/workflows/pana.yml @@ -14,7 +14,6 @@ concurrency: permissions: contents: read - pull-requests: read jobs: stream_core: diff --git a/.github/workflows/stream_core_flutter_workflow.yml b/.github/workflows/stream_core_flutter_workflow.yml index 4728d5db1..c0bb6cb61 100644 --- a/.github/workflows/stream_core_flutter_workflow.yml +++ b/.github/workflows/stream_core_flutter_workflow.yml @@ -21,7 +21,6 @@ concurrency: permissions: contents: read - pull-requests: read jobs: analyze: @@ -68,7 +67,6 @@ jobs: runs-on: ubuntu-latest permissions: contents: read - pull-requests: read # Codecov authenticates the coverage upload with a GitHub OIDC token. id-token: write env: @@ -105,3 +103,4 @@ jobs: with: use_oidc: true files: packages/*/coverage/lcov.info + disable_search: true diff --git a/.github/workflows/stream_thumbnail_native_builds.yml b/.github/workflows/stream_thumbnail_native_builds.yml index 5e90d86d6..f6014836e 100644 --- a/.github/workflows/stream_thumbnail_native_builds.yml +++ b/.github/workflows/stream_thumbnail_native_builds.yml @@ -28,7 +28,6 @@ concurrency: permissions: contents: read - pull-requests: read jobs: android: From 0cf9fa59a088583da9e31631ea3e4d9f819aff01 Mon Sep 17 00:00:00 2001 From: Sahil Kumar Date: Fri, 27 Nov 2026 15:05:42 +0100 Subject: [PATCH 08/27] ci(repo): compare goldens on the image that renders them 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 --- .github/workflows/stream_core_flutter_workflow.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/stream_core_flutter_workflow.yml b/.github/workflows/stream_core_flutter_workflow.yml index c0bb6cb61..90dfec6f5 100644 --- a/.github/workflows/stream_core_flutter_workflow.yml +++ b/.github/workflows/stream_core_flutter_workflow.yml @@ -64,7 +64,9 @@ jobs: test: needs: analyze timeout-minutes: 15 - runs-on: ubuntu-latest + # The image update_goldens renders on, so a golden that renders differently + # on another image can still be regenerated to match. + runs-on: ubuntu-24.04 permissions: contents: read # Codecov authenticates the coverage upload with a GitHub OIDC token. From 9f07c60303486957cd6db9068bd25701e05b89d3 Mon Sep 17 00:00:00 2001 From: Sahil Kumar Date: Fri, 27 Nov 2026 15:10:20 +0100 Subject: [PATCH 09/27] ci(repo): render goldens on a free runner pinned with the test job 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 --- .../stream_core_flutter_workflow.yml | 5 +- .github/workflows/update_goldens.yml | 51 +++++++++++++++---- 2 files changed, 43 insertions(+), 13 deletions(-) diff --git a/.github/workflows/stream_core_flutter_workflow.yml b/.github/workflows/stream_core_flutter_workflow.yml index 90dfec6f5..f7117cf65 100644 --- a/.github/workflows/stream_core_flutter_workflow.yml +++ b/.github/workflows/stream_core_flutter_workflow.yml @@ -64,8 +64,9 @@ jobs: test: needs: analyze timeout-minutes: 15 - # The image update_goldens renders on, so a golden that renders differently - # on another image can still be regenerated to match. + # The image update_goldens renders on (its `render` job), so a golden that + # renders differently on another image can still be regenerated to match. + # Change both together. runs-on: ubuntu-24.04 permissions: contents: read diff --git a/.github/workflows/update_goldens.yml b/.github/workflows/update_goldens.yml index 4237ed235..cf58f5d52 100644 --- a/.github/workflows/update_goldens.yml +++ b/.github/workflows/update_goldens.yml @@ -6,17 +6,11 @@ permissions: contents: read jobs: - update_goldens: - runs-on: - group: github-public-amd64 + # Renders on a free runner. The image is pinned to the one `test` in + # stream_core_flutter_workflow.yml compares on; change both together. + render: + runs-on: ubuntu-24.04 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 }} - - name: ๐Ÿ“š Checkout branch uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 with: @@ -40,9 +34,44 @@ jobs: continue-on-error: true run: melos run update:goldens + - name: ๐Ÿ“ค Upload Goldens + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 + with: + name: goldens + path: "**/test/**/goldens/**/*.png" + 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: + 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@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 + 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: GetStream/stream-core-flutter/.github/actions/bot-commit@68fdf0bf3c779f640dbb10a1ecf7945d872408f7 + uses: ./.github/actions/bot-commit with: files: "**/test/**/goldens/**/*.png" message: "chore: Update Goldens" token: ${{ steps.ci-bot-token.outputs.token }} + detect-changes: "false" From 515e263129722ee5a66f3a512575858b95ba4526 Mon Sep 17 00:00:00 2001 From: Sahil Kumar Date: Fri, 27 Nov 2026 15:11:56 +0100 Subject: [PATCH 10/27] ci(repo): render and compare goldens on ubuntu-latest 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 --- .github/workflows/stream_core_flutter_workflow.yml | 4 ++-- .github/workflows/update_goldens.yml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/stream_core_flutter_workflow.yml b/.github/workflows/stream_core_flutter_workflow.yml index f7117cf65..7dd89b444 100644 --- a/.github/workflows/stream_core_flutter_workflow.yml +++ b/.github/workflows/stream_core_flutter_workflow.yml @@ -64,10 +64,10 @@ jobs: test: needs: analyze timeout-minutes: 15 - # The image update_goldens renders on (its `render` job), so a golden that + # The runner update_goldens renders on (its `render` job), so a golden that # renders differently on another image can still be regenerated to match. # Change both together. - runs-on: ubuntu-24.04 + runs-on: ubuntu-latest permissions: contents: read # Codecov authenticates the coverage upload with a GitHub OIDC token. diff --git a/.github/workflows/update_goldens.yml b/.github/workflows/update_goldens.yml index cf58f5d52..7b2916a3b 100644 --- a/.github/workflows/update_goldens.yml +++ b/.github/workflows/update_goldens.yml @@ -6,10 +6,10 @@ permissions: contents: read jobs: - # Renders on a free runner. The image is pinned to the one `test` in - # stream_core_flutter_workflow.yml compares on; change both together. + # Renders on a free runner, the one `test` in stream_core_flutter_workflow.yml + # compares on; change both together. render: - runs-on: ubuntu-24.04 + runs-on: ubuntu-latest steps: - name: ๐Ÿ“š Checkout branch uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 From f69e4432de716532b6afeef058c621109b08bc44 Mon Sep 17 00:00:00 2001 From: Sahil Kumar Date: Fri, 27 Nov 2026 15:31:32 +0100 Subject: [PATCH 11/27] ci(repo): build and deploy the gallery on free runners 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 --- .github/workflows/pr_web_build.yml | 50 ++++++++++++++++++---- .github/workflows/publish_gallery.yml | 60 +++++++++++++++++++-------- .github/workflows/release_publish.yml | 4 +- 3 files changed, 88 insertions(+), 26 deletions(-) diff --git a/.github/workflows/pr_web_build.yml b/.github/workflows/pr_web_build.yml index 7ef682ac6..c4537b677 100644 --- a/.github/workflows/pr_web_build.yml +++ b/.github/workflows/pr_web_build.yml @@ -6,6 +6,10 @@ name: pr_web_build # request removes the build. Builds left behind are removed after 30 days by # the next prod or beta deploy. Fork pull requests are skipped: their runs get # no identity token. +# +# Building and deploying make no GitHub API call, so they run on free +# runners; only the comment jobs call the API, which the org IP allow list +# permits from the static-IP runners alone. on: pull_request: @@ -32,8 +36,7 @@ jobs: github.event.action != 'unlabeled' && contains(github.event.pull_request.labels.*.name, 'build') && (github.event.action != 'labeled' || github.event.label.name == 'build') - runs-on: - group: github-public-amd64 + runs-on: ubuntu-latest timeout-minutes: 20 # On the jobs rather than the workflow, so a run that skips both (another # label added) leaves a running deploy alone. @@ -43,10 +46,11 @@ jobs: environment: name: flutter-web-pr url: ${{ steps.target.outputs.url }} + outputs: + url: ${{ steps.target.outputs.url }} permissions: contents: read id-token: write - pull-requests: write steps: - name: ๐Ÿ“š Checkout uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 @@ -78,11 +82,28 @@ jobs: service-account: ${{ steps.target.outputs.service-account }} build-dir: apps/design_system_gallery/build/web + comment: + name: Comment the Link + needs: deploy + runs-on: + group: github-public-amd64 + timeout-minutes: 5 + permissions: + contents: read + pull-requests: write + steps: + # Only for the local action; other repositories use it without a checkout. + - name: ๐Ÿ“š Checkout + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 + with: + persist-credentials: false + sparse-checkout: .github/actions + - name: ๐Ÿ’ฌ Comment the Link uses: ./.github/actions/flutter-web-pr-comment with: app: design-system - url: ${{ steps.target.outputs.url }} + url: ${{ needs.deploy.outputs.url }} remove: name: Remove Build @@ -90,8 +111,7 @@ jobs: github.event.pull_request.head.repo.full_name == github.repository && ((github.event.action == 'closed' && contains(github.event.pull_request.labels.*.name, 'build')) || (github.event.action == 'unlabeled' && github.event.label.name == 'build')) - runs-on: - group: github-public-amd64 + runs-on: ubuntu-latest timeout-minutes: 5 # Shares the deploy's group, so it stops a deploy that is still running. concurrency: @@ -102,7 +122,6 @@ jobs: permissions: contents: read id-token: write - pull-requests: write steps: # Only for the local actions; other repositories use them without a # checkout. @@ -125,6 +144,23 @@ jobs: path: ${{ steps.target.outputs.path }} service-account: ${{ steps.target.outputs.service-account }} + remove_comment: + name: Update the Comment + needs: remove + runs-on: + group: github-public-amd64 + timeout-minutes: 5 + permissions: + contents: read + pull-requests: write + steps: + # Only for the local action; other repositories use it without a checkout. + - name: ๐Ÿ“š Checkout + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 + with: + persist-credentials: false + sparse-checkout: .github/actions + - name: ๐Ÿ’ฌ Update the Comment uses: ./.github/actions/flutter-web-pr-comment with: diff --git a/.github/workflows/publish_gallery.yml b/.github/workflows/publish_gallery.yml index 16f4916bd..1ced9d14e 100644 --- a/.github/workflows/publish_gallery.yml +++ b/.github/workflows/publish_gallery.yml @@ -24,23 +24,16 @@ permissions: contents: read jobs: - build_and_deploy_gallery: + # Builds on a free runner; only the push below needs the static-IP runners. + build_gallery: if: github.ref == 'refs/heads/main' - runs-on: - group: github-public-amd64 + runs-on: ubuntu-latest timeout-minutes: 10 - permissions: - contents: write steps: - name: Checkout code uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 with: - fetch-depth: 0 - - - name: config git - run: | - git config --global user.email "$(git log --format='%ae' HEAD^!)" - git config --global user.name "$(git log --format='%an' HEAD^!)" + persist-credentials: false - name: Setup Flutter uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 # v2.23.0 @@ -54,16 +47,49 @@ jobs: - name: Bootstrap Workspace run: melos bootstrap - - name: Build and Deploy - uses: bluefireteam/flutter-gh-pages@cf4a9312849577dbfd9df8f3d63d12ef6b09898e # v9 + - name: Build + working-directory: apps/design_system_gallery + run: flutter build web --release --base-href /stream-core-flutter/ + + - name: Upload Build + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 with: - baseHref: /stream-core-flutter/ - workingDir: apps/design_system_gallery + name: gallery-pages + path: apps/design_system_gallery/build/web + if-no-files-found: error + retention-days: 1 + + # Replaces gh-pages with a commit on top of main holding only the build. + publish_pages: + needs: build_gallery + runs-on: + group: github-public-amd64 + timeout-minutes: 5 + permissions: + contents: write + steps: + - name: Checkout code + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 + + - name: Download Build + uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 + with: + name: gallery-pages + path: ${{ runner.temp }}/gallery-pages + + - name: Push to gh-pages + env: + BUILD_DIR: ${{ runner.temp }}/gallery-pages + run: | + git config user.name github-actions + git config user.email github-actions@github.com + git --work-tree "$BUILD_DIR" add --all + git commit -m "Automatic deployment by github-actions" + git push origin HEAD:gh-pages --force deploy_hosted: name: Deploy to flutter.getstream.io - runs-on: - group: github-public-amd64 + runs-on: ubuntu-latest timeout-minutes: 20 concurrency: group: web-deploy-design-system-beta diff --git a/.github/workflows/release_publish.yml b/.github/workflows/release_publish.yml index 3ae29d271..3b47b9ff1 100644 --- a/.github/workflows/release_publish.yml +++ b/.github/workflows/release_publish.yml @@ -228,8 +228,8 @@ jobs: name: Deploy the Gallery to flutter.getstream.io needs: release if: needs.release.outputs.package == 'stream_core_flutter' && needs.release.outputs.prerelease == 'false' - runs-on: - group: github-public-amd64 + # Builds and deploys to Google Cloud without a GitHub API call, so a free runner works. + runs-on: ubuntu-latest timeout-minutes: 20 concurrency: group: web-deploy-design-system-prod From 688529ffa7ef223442d39c78541118fcaf23e17c Mon Sep 17 00:00:00 2001 From: Sahil Kumar Date: Fri, 27 Nov 2026 15:34:09 +0100 Subject: [PATCH 12/27] ci(repo): add a reusable workflow that commits an artifact Jobs that render or generate files on a free runner hand them to this workflow, which commits them with bot-commit from the static-IP runners, the only ones the org IP allow list lets call the GitHub API. Saves each caller the token, checkout and download boilerplate. update_goldens is the first caller. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/commit_artifact.yml | 102 ++++++++++++++++++++++++++ .github/workflows/update_goldens.yml | 39 ++-------- 2 files changed, 110 insertions(+), 31 deletions(-) create mode 100644 .github/workflows/commit_artifact.yml diff --git a/.github/workflows/commit_artifact.yml b/.github/workflows/commit_artifact.yml new file mode 100644 index 000000000..70df95940 --- /dev/null +++ b/.github/workflows/commit_artifact.yml @@ -0,0 +1,102 @@ +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@ +# 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: + 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 }} + + - 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@e823bcc597a13dc9b243f53f84eaa06f08f66f97 + 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" diff --git a/.github/workflows/update_goldens.yml b/.github/workflows/update_goldens.yml index 7b2916a3b..2764fd1d3 100644 --- a/.github/workflows/update_goldens.yml +++ b/.github/workflows/update_goldens.yml @@ -42,36 +42,13 @@ 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: 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@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 - 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 }} From c84e75b6da99670cd5f95d7dba00482f3107ee65 Mon Sep 17 00:00:00 2001 From: Sahil Kumar Date: Fri, 27 Nov 2026 15:38:54 +0100 Subject: [PATCH 13/27] ci(repo): name the new gallery and golden jobs like the other workflows 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 --- .github/workflows/publish_gallery.yml | 31 +++++++++++---------------- .github/workflows/update_goldens.yml | 2 ++ 2 files changed, 15 insertions(+), 18 deletions(-) diff --git a/.github/workflows/publish_gallery.yml b/.github/workflows/publish_gallery.yml index 1ced9d14e..ad5266159 100644 --- a/.github/workflows/publish_gallery.yml +++ b/.github/workflows/publish_gallery.yml @@ -25,33 +25,27 @@ permissions: jobs: # Builds on a free runner; only the push below needs the static-IP runners. - build_gallery: + build_pages: + name: Build for GitHub Pages if: github.ref == 'refs/heads/main' runs-on: ubuntu-latest timeout-minutes: 10 steps: - - name: Checkout code + - name: ๐Ÿ“š Checkout uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 with: persist-credentials: false - - name: Setup Flutter - uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 # v2.23.0 + - name: ๐Ÿงฉ Bootstrap Workspace + uses: ./.github/actions/bootstrap with: - channel: ${{ env.FLUTTER_CHANNEL }} - flutter-version: ${{ env.FLUTTER_VERSION }} - - - name: Install Tools - run: flutter pub global activate melos + flutter-channel: ${{ env.FLUTTER_CHANNEL }} - - name: Bootstrap Workspace - run: melos bootstrap - - - name: Build + - name: ๐Ÿ—๏ธ Build working-directory: apps/design_system_gallery run: flutter build web --release --base-href /stream-core-flutter/ - - name: Upload Build + - name: ๐Ÿ“ค Upload Build uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 with: name: gallery-pages @@ -61,23 +55,24 @@ jobs: # Replaces gh-pages with a commit on top of main holding only the build. publish_pages: - needs: build_gallery + name: Publish to GitHub Pages + needs: build_pages runs-on: group: github-public-amd64 timeout-minutes: 5 permissions: contents: write steps: - - name: Checkout code + - name: ๐Ÿ“š Checkout uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 - - name: Download Build + - name: ๐Ÿ“ฅ Download Build uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 with: name: gallery-pages path: ${{ runner.temp }}/gallery-pages - - name: Push to gh-pages + - name: ๐Ÿš€ Push to gh-pages env: BUILD_DIR: ${{ runner.temp }}/gallery-pages run: | diff --git a/.github/workflows/update_goldens.yml b/.github/workflows/update_goldens.yml index 7b2916a3b..6320c7281 100644 --- a/.github/workflows/update_goldens.yml +++ b/.github/workflows/update_goldens.yml @@ -9,6 +9,7 @@ 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 steps: - name: ๐Ÿ“š Checkout branch @@ -45,6 +46,7 @@ jobs: # 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 From b3f3e34302fb3ae78011f56abcec2963a0847993 Mon Sep 17 00:00:00 2001 From: Sahil Kumar Date: Fri, 27 Nov 2026 15:39:32 +0100 Subject: [PATCH 14/27] ci(repo): name the reusable commit job Co-Authored-By: Claude Opus 5.5 --- .github/workflows/commit_artifact.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/commit_artifact.yml b/.github/workflows/commit_artifact.yml index 70df95940..57cb12482 100644 --- a/.github/workflows/commit_artifact.yml +++ b/.github/workflows/commit_artifact.yml @@ -69,6 +69,7 @@ permissions: jobs: commit: + name: Commit Files runs-on: group: github-public-amd64 timeout-minutes: 5 From d70ad8706b6dc4e394c472ebefcefdfb6a1559af Mon Sep 17 00:00:00 2001 From: Sahil Kumar Date: Fri, 27 Nov 2026 15:40:42 +0100 Subject: [PATCH 15/27] ci(repo): sign gh-pages deploys as the Actions bot, naming the source commit Co-Authored-By: Claude Opus 5.5 --- .github/workflows/publish_gallery.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish_gallery.yml b/.github/workflows/publish_gallery.yml index ad5266159..3f706caab 100644 --- a/.github/workflows/publish_gallery.yml +++ b/.github/workflows/publish_gallery.yml @@ -75,11 +75,12 @@ jobs: - name: ๐Ÿš€ Push to gh-pages env: BUILD_DIR: ${{ runner.temp }}/gallery-pages + SHA: ${{ github.sha }} run: | - git config user.name github-actions - git config user.email github-actions@github.com + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" git --work-tree "$BUILD_DIR" add --all - git commit -m "Automatic deployment by github-actions" + git commit -m "Deploy the gallery from $SHA" git push origin HEAD:gh-pages --force deploy_hosted: From 9782b463e40f6b53b04d0d117683b5a3cde076c1 Mon Sep 17 00:00:00 2001 From: Sahil Kumar Date: Fri, 27 Nov 2026 16:23:36 +0100 Subject: [PATCH 16/27] ci(repo): stop publishing the gallery to GitHub Pages 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 --- .github/workflows/publish_gallery.yml | 66 +-------------------------- 1 file changed, 2 insertions(+), 64 deletions(-) diff --git a/.github/workflows/publish_gallery.yml b/.github/workflows/publish_gallery.yml index 3f706caab..784739fe6 100644 --- a/.github/workflows/publish_gallery.yml +++ b/.github/workflows/publish_gallery.yml @@ -1,8 +1,8 @@ name: Publish Design System Gallery # Deploys the gallery to https://flutter.getstream.io/design-system/beta/ on -# every push to main, and publishes it to GitHub Pages. A manual run on main -# deploys beta again; flutter-web refuses other branches. +# every push to main. A manual run on main deploys beta again; flutter-web +# refuses other branches. # # Prod (https://flutter.getstream.io/design-system/) is deployed by # release_publish.yml, once a stream_core_flutter release is on pub.dev. @@ -13,9 +13,6 @@ on: - main workflow_dispatch: -env: - FLUTTER_CHANNEL: stable - concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true @@ -24,65 +21,6 @@ permissions: contents: read jobs: - # Builds on a free runner; only the push below needs the static-IP runners. - build_pages: - name: Build for GitHub Pages - if: github.ref == 'refs/heads/main' - runs-on: ubuntu-latest - timeout-minutes: 10 - steps: - - name: ๐Ÿ“š Checkout - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 - with: - persist-credentials: false - - - name: ๐Ÿงฉ Bootstrap Workspace - uses: ./.github/actions/bootstrap - with: - flutter-channel: ${{ env.FLUTTER_CHANNEL }} - - - name: ๐Ÿ—๏ธ Build - working-directory: apps/design_system_gallery - run: flutter build web --release --base-href /stream-core-flutter/ - - - name: ๐Ÿ“ค Upload Build - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 - with: - name: gallery-pages - path: apps/design_system_gallery/build/web - if-no-files-found: error - retention-days: 1 - - # Replaces gh-pages with a commit on top of main holding only the build. - publish_pages: - name: Publish to GitHub Pages - needs: build_pages - runs-on: - group: github-public-amd64 - timeout-minutes: 5 - permissions: - contents: write - steps: - - name: ๐Ÿ“š Checkout - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 - - - name: ๐Ÿ“ฅ Download Build - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 - with: - name: gallery-pages - path: ${{ runner.temp }}/gallery-pages - - - name: ๐Ÿš€ Push to gh-pages - env: - BUILD_DIR: ${{ runner.temp }}/gallery-pages - SHA: ${{ github.sha }} - run: | - git config user.name "github-actions[bot]" - git config user.email "41898282+github-actions[bot]@users.noreply.github.com" - git --work-tree "$BUILD_DIR" add --all - git commit -m "Deploy the gallery from $SHA" - git push origin HEAD:gh-pages --force - deploy_hosted: name: Deploy to flutter.getstream.io runs-on: ubuntu-latest From c8a586f3678b3b3a1e47391aaf380707b042c1d0 Mon Sep 17 00:00:00 2001 From: Sahil Kumar Date: Fri, 27 Nov 2026 16:43:13 +0100 Subject: [PATCH 17/27] ci(repo): run the legacy-analysis gate on a free runner 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 --- .github/workflows/legacy_version_analyze.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/legacy_version_analyze.yml b/.github/workflows/legacy_version_analyze.yml index 3f2211ddd..3d94e430c 100644 --- a/.github/workflows/legacy_version_analyze.yml +++ b/.github/workflows/legacy_version_analyze.yml @@ -21,7 +21,6 @@ concurrency: permissions: contents: read - pull-requests: read jobs: # Decides whether the analysis runs: on every push, and on a pull request @@ -30,13 +29,11 @@ jobs: # never reports and leaves a required check waiting forever. See # https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks gate: - runs-on: - group: github-public-amd64 + runs-on: ubuntu-latest outputs: should_run: ${{ github.event_name == 'push' || (steps.filter.outputs.packages == 'true' && github.event.pull_request.draft != true) }} steps: - # paths-filter diffs against git history on push events, so it needs a - # checkout there. On pull requests it uses the API instead. + # paths-filter diffs against git history, so it needs a checkout. - name: "Git Checkout" uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 with: @@ -46,6 +43,10 @@ jobs: uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3 id: filter with: + # No token: on pull requests it then diffs with git against the base + # branch instead of calling the GitHub API, which the org IP allow + # list refuses from standard runners. + token: "" filters: | packages: - 'packages/**' From 6033a436f9d8e5feae5c046a27ff71b6cc1dec3f Mon Sep 17 00:00:00 2001 From: Sahil Kumar Date: Fri, 27 Nov 2026 16:44:38 +0100 Subject: [PATCH 18/27] ci(repo): detect the gate's package changes with a two-commit git diff 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 --- .github/workflows/legacy_version_analyze.yml | 26 ++++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/legacy_version_analyze.yml b/.github/workflows/legacy_version_analyze.yml index 3d94e430c..7a23ce01b 100644 --- a/.github/workflows/legacy_version_analyze.yml +++ b/.github/workflows/legacy_version_analyze.yml @@ -33,24 +33,24 @@ jobs: outputs: should_run: ${{ github.event_name == 'push' || (steps.filter.outputs.packages == 'true' && github.event.pull_request.draft != true) }} steps: - # paths-filter diffs against git history, so it needs a checkout. - - name: "Git Checkout" + # A pull request checks out its test merge commit, whose first parent is + # the base branch, so the last two commits hold exactly its changes. + - name: ๐Ÿ“š Checkout + if: github.event_name == 'pull_request' uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 with: + fetch-depth: 2 persist-credentials: false - - name: "Detect Path Changes" - uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3 + - name: ๐Ÿ” Detect Package Changes + if: github.event_name == 'pull_request' id: filter - with: - # No token: on pull requests it then diffs with git against the base - # branch instead of calling the GitHub API, which the org IP allow - # list refuses from standard runners. - token: "" - filters: | - packages: - - 'packages/**' - - '.github/workflows/legacy_version_analyze.yml' + run: | + if git diff --name-only HEAD^1 HEAD | grep -qE '^(packages/|\.github/workflows/legacy_version_analyze\.yml$)'; then + echo "packages=true" >> "$GITHUB_OUTPUT" + else + echo "packages=false" >> "$GITHUB_OUTPUT" + fi # Does a sanity check that packages at least pass analysis on the N-1 # versions of Flutter stable if the package claims to support that version. From 3331064bf96fd4699e368dd8210c86ba943a34ff Mon Sep 17 00:00:00 2001 From: Sahil Kumar Date: Fri, 27 Nov 2026 16:47:07 +0100 Subject: [PATCH 19/27] ci(repo): count files moved out of packages/ in the legacy-analysis gate 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 --- .github/workflows/legacy_version_analyze.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/legacy_version_analyze.yml b/.github/workflows/legacy_version_analyze.yml index 7a23ce01b..827bd46f8 100644 --- a/.github/workflows/legacy_version_analyze.yml +++ b/.github/workflows/legacy_version_analyze.yml @@ -35,6 +35,8 @@ jobs: steps: # A pull request checks out its test merge commit, whose first parent is # the base branch, so the last two commits hold exactly its changes. + # --no-renames lists a moved file under both paths, so moving one out of + # packages/ still counts. - name: ๐Ÿ“š Checkout if: github.event_name == 'pull_request' uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 @@ -46,7 +48,7 @@ jobs: if: github.event_name == 'pull_request' id: filter run: | - if git diff --name-only HEAD^1 HEAD | grep -qE '^(packages/|\.github/workflows/legacy_version_analyze\.yml$)'; then + if git diff --name-only --no-renames HEAD^1 HEAD | grep -qE '^(packages/|\.github/workflows/legacy_version_analyze\.yml$)'; then echo "packages=true" >> "$GITHUB_OUTPUT" else echo "packages=false" >> "$GITHUB_OUTPUT" From 7ea042da62f596f6ba6e653f6115d11b1bc9e970 Mon Sep 17 00:00:00 2001 From: Sahil Kumar Date: Fri, 27 Nov 2026 16:49:07 +0100 Subject: [PATCH 20/27] ci(repo): detect path changes with a reusable workflow on a free runner 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 --- .github/workflows/detect_changes.yml | 101 +++++++++++++++++++ .github/workflows/legacy_version_analyze.yml | 31 ++---- 2 files changed, 107 insertions(+), 25 deletions(-) create mode 100644 .github/workflows/detect_changes.yml diff --git a/.github/workflows/detect_changes.yml b/.github/workflows/detect_changes.yml new file mode 100644 index 000000000..ac2f2927a --- /dev/null +++ b/.github/workflows/detect_changes.yml @@ -0,0 +1,101 @@ +name: detect_changes + +# Tells whether a pull request or push changes any of the given paths, for a +# gate job that decides whether heavier jobs run. Diffs with git on a free +# runner, so it needs no token: the GitHub API that dorny/paths-filter calls +# on pull requests is refused from standard runners by the org IP allow list. +# +# gate: +# uses: GetStream/stream-core-flutter/.github/workflows/detect_changes.yml@ +# with: +# paths: | +# packages/** +# .github/workflows/my_workflow.yml +# +# analyze: +# needs: gate +# if: needs.gate.outputs.changed == 'true' +# +# A pull request is compared with its base branch, a push with the commit +# before it. A new branch, a push whose previous commit is gone, and any other +# event count as changed. + +on: + workflow_call: + inputs: + paths: + description: > + Glob patterns, one per line, such as `packages/**`. `*` stays within + a directory and `**` crosses them, as in git's `:(glob)` pathspecs. + type: string + required: true + outputs: + changed: + description: "`true` when a matching file was added, changed, deleted or moved." + value: ${{ jobs.detect.outputs.changed }} + +permissions: + contents: read + +jobs: + detect: + name: Detect Changes + runs-on: ubuntu-latest + timeout-minutes: 5 + outputs: + changed: ${{ steps.detect.outputs.changed }} + steps: + # A pull request checks out its test merge commit, whose first parent is + # the base branch. + - name: ๐Ÿ“š Checkout + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 + with: + fetch-depth: 2 + persist-credentials: false + + # --no-renames lists a moved file under both paths, so moving one out of + # a watched directory still counts. + - name: ๐Ÿ” Detect Changes + id: detect + env: + EVENT: ${{ github.event_name }} + BEFORE: ${{ github.event.before }} + PATHS: ${{ inputs.paths }} + run: | + set -euo pipefail + specs=() + while IFS= read -r line; do + line="${line#"${line%%[![:space:]]*}"}" + line="${line%"${line##*[![:space:]]}"}" + if [ -n "$line" ]; then specs+=(":(glob)$line"); fi + done <<< "$PATHS" + if [ ${#specs[@]} -eq 0 ]; then + echo "::error::paths is empty" + exit 1 + fi + + base= + case "$EVENT" in + pull_request) base=HEAD^1 ;; + push) + if [[ ! $BEFORE =~ ^0+$ ]] && git fetch -q --depth=1 origin "$BEFORE"; then + base=$BEFORE + fi + ;; + esac + + if [ -z "$base" ]; then + echo "No commit to compare with on $EVENT, so everything counts as changed." + changed=true + else + files=$(git diff --name-only --no-renames "$base" HEAD -- "${specs[@]}") + if [ -n "$files" ]; then + echo "Changed files matching paths:" + echo "$files" + changed=true + else + echo "No changed file matches paths." + changed=false + fi + fi + echo "changed=$changed" >> "$GITHUB_OUTPUT" diff --git a/.github/workflows/legacy_version_analyze.yml b/.github/workflows/legacy_version_analyze.yml index 827bd46f8..2f1fac2df 100644 --- a/.github/workflows/legacy_version_analyze.yml +++ b/.github/workflows/legacy_version_analyze.yml @@ -29,30 +29,11 @@ jobs: # never reports and leaves a required check waiting forever. See # https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks gate: - runs-on: ubuntu-latest - outputs: - should_run: ${{ github.event_name == 'push' || (steps.filter.outputs.packages == 'true' && github.event.pull_request.draft != true) }} - steps: - # A pull request checks out its test merge commit, whose first parent is - # the base branch, so the last two commits hold exactly its changes. - # --no-renames lists a moved file under both paths, so moving one out of - # packages/ still counts. - - name: ๐Ÿ“š Checkout - if: github.event_name == 'pull_request' - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 - with: - fetch-depth: 2 - persist-credentials: false - - - name: ๐Ÿ” Detect Package Changes - if: github.event_name == 'pull_request' - id: filter - run: | - if git diff --name-only --no-renames HEAD^1 HEAD | grep -qE '^(packages/|\.github/workflows/legacy_version_analyze\.yml$)'; then - echo "packages=true" >> "$GITHUB_OUTPUT" - else - echo "packages=false" >> "$GITHUB_OUTPUT" - fi + uses: ./.github/workflows/detect_changes.yml + with: + paths: | + packages/** + .github/workflows/legacy_version_analyze.yml # Does a sanity check that packages at least pass analysis on the N-1 # versions of Flutter stable if the package claims to support that version. @@ -61,7 +42,7 @@ jobs: # without updating the constraints. analyze_legacy_version: needs: gate - if: needs.gate.outputs.should_run == 'true' + if: github.event_name == 'push' || (needs.gate.outputs.changed == 'true' && github.event.pull_request.draft != true) timeout-minutes: 15 runs-on: ubuntu-latest steps: From 0e1ff090362b49183c53e47f7b72b8dcdb0196d1 Mon Sep 17 00:00:00 2001 From: Sahil Kumar Date: Fri, 27 Nov 2026 16:49:38 +0100 Subject: [PATCH 21/27] ci(repo): name the legacy-analysis gate and its steps like the other workflows Co-Authored-By: Claude Opus 5.5 --- .github/workflows/legacy_version_analyze.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/legacy_version_analyze.yml b/.github/workflows/legacy_version_analyze.yml index 2f1fac2df..ecf5548de 100644 --- a/.github/workflows/legacy_version_analyze.yml +++ b/.github/workflows/legacy_version_analyze.yml @@ -29,6 +29,7 @@ jobs: # never reports and leaves a required check waiting forever. See # https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks gate: + name: Check Package Changes uses: ./.github/workflows/detect_changes.yml with: paths: | @@ -40,18 +41,19 @@ jobs: # This is to minimize accidentally making changes that break old versions # (which we don't commit to supporting, but don't want to actively break) # without updating the constraints. + # No `name:`: the ruleset requires this check by its job ID. analyze_legacy_version: needs: gate if: github.event_name == 'push' || (needs.gate.outputs.changed == 'true' && github.event.pull_request.draft != true) timeout-minutes: 15 runs-on: ubuntu-latest steps: - - name: "Git Checkout" + - name: ๐Ÿ“š Checkout uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 with: persist-credentials: false - - name: "Install Flutter" + - name: ๐Ÿฆ Install Flutter uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 # v2.23.0 with: cache: true From 1d604e0c9332184d8b205d27e2f18cb669aa55c0 Mon Sep 17 00:00:00 2001 From: Sahil Kumar Date: Fri, 27 Nov 2026 16:53:17 +0100 Subject: [PATCH 22/27] ci(repo): give every step an emoji name and every job a name 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 --- .github/actions/bootstrap/action.yml | 6 +-- .github/actions/package_analysis/action.yml | 6 +-- .github/actions/pana/action.yml | 8 ++-- .github/workflows/beta_version_analyze.yml | 8 ++-- .github/workflows/pr_labels.yml | 1 + .github/workflows/pr_review_labels.yml | 2 + .github/workflows/pr_title.yml | 10 +++-- .github/workflows/pr_version_labels.yml | 1 + .github/workflows/release_publish.yml | 1 + .github/workflows/release_tag.yml | 1 + .../stream_core_flutter_workflow.yml | 28 ++++++------ .../stream_thumbnail_native_builds.yml | 44 +++++++++++-------- .github/workflows/sync_style_guides.yml | 2 + .../workflows/update_top_level_domains.yml | 1 + 14 files changed, 70 insertions(+), 49 deletions(-) diff --git a/.github/actions/bootstrap/action.yml b/.github/actions/bootstrap/action.yml index 9c2993729..80306471a 100644 --- a/.github/actions/bootstrap/action.yml +++ b/.github/actions/bootstrap/action.yml @@ -15,14 +15,14 @@ inputs: runs: using: composite steps: - - name: Install Flutter + - name: ๐Ÿฆ Install Flutter uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 # v2.23.0 with: cache: true cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }} channel: ${{ inputs.flutter-channel }} - - name: Install Melos + - name: ๐Ÿ“ฆ Install Melos shell: bash working-directory: ${{ github.workspace }} run: flutter pub global activate melos @@ -35,7 +35,7 @@ runs: # Invoked through `pub global run` rather than as a bare `melos`, so it does # not depend on the pub-cache bin directory being on PATH โ€” that differs # between the ubuntu, macos and windows runners this action is used from. - - name: Bootstrap Workspace + - name: ๐Ÿงฉ Bootstrap Workspace shell: bash working-directory: ${{ github.workspace }} run: flutter pub global run melos bootstrap diff --git a/.github/actions/package_analysis/action.yml b/.github/actions/package_analysis/action.yml index 388694167..0615b9099 100644 --- a/.github/actions/package_analysis/action.yml +++ b/.github/actions/package_analysis/action.yml @@ -3,11 +3,11 @@ name: Package Analysis runs: using: "composite" steps: - - name: "Install Tools" + - name: ๐Ÿ“ฆ Install Tools shell: bash run: flutter pub global activate melos - - name: "Bootstrap Workspace" + - name: ๐Ÿงฉ Bootstrap Workspace shell: bash run: melos bootstrap --verbose env: @@ -15,6 +15,6 @@ runs: # Only analyze lib/; non-client code doesn't need to work on # all supported legacy version. - - name: "Stream Core Analyze" + - name: ๐Ÿ” Analyze stream_core shell: bash run: cd packages/stream_core/lib && dart analyze --fatal-warnings . && cd .. && flutter test --exclude-tags golden diff --git a/.github/actions/pana/action.yml b/.github/actions/pana/action.yml index a6a662b34..00daf6410 100644 --- a/.github/actions/pana/action.yml +++ b/.github/actions/pana/action.yml @@ -22,13 +22,13 @@ runs: steps: # Pana resolves the package on its own, so a dependency on a sibling package would come from pub.dev and miss # the changes in this checkout. Point it at the sibling's directory instead. - - name: Resolve Sibling Packages From The Checkout + - name: ๐Ÿ”— Resolve Sibling Packages From The Checkout uses: mikefarah/yq@f2944b823f84906a127dbd29e4c2a3e60c4e550e # v4.54.3 with: cmd: | yq eval '(.dependencies | select(has("stream_core")) | .stream_core) = {"path": "../stream_core"}' -i packages/stream_core_flutter/pubspec.yaml - - name: Install Flutter + - name: ๐Ÿฆ Install Flutter uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 # v2.23.0 with: cache: true @@ -36,12 +36,12 @@ runs: flutter-version: "3.x" cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }} - - name: Install Pana + - name: ๐Ÿ“ฆ Install Pana working-directory: ${{ inputs.working_directory }} shell: bash run: flutter pub global activate pana ${{inputs.pana_version}} - - name: Verify Pana Score + - name: ๐Ÿ“Š Verify Pana Score working-directory: ${{ inputs.working_directory }} shell: bash run: | diff --git a/.github/workflows/beta_version_analyze.yml b/.github/workflows/beta_version_analyze.yml index b1cde4838..310573987 100644 --- a/.github/workflows/beta_version_analyze.yml +++ b/.github/workflows/beta_version_analyze.yml @@ -12,15 +12,16 @@ permissions: jobs: # Does a sanity check on packages for the next beta version so we are not surprised by any breaking changes. analyze_beta_versions: + name: Analyze on Flutter Beta timeout-minutes: 15 runs-on: ubuntu-latest steps: - - name: "Git Checkout" + - name: ๐Ÿ“š Checkout uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 with: persist-credentials: false - - name: "Install Flutter" + - name: ๐Ÿฆ Install Flutter uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 # v2.23.0 with: channel: beta @@ -37,7 +38,8 @@ jobs: needs: [analyze_beta_versions] if: failure() && github.event_name == 'schedule' steps: - - uses: 8398a7/action-slack@77eaa4f1c608a7d68b38af4e3f739dcd8cba273e # v3.19.0 + - name: ๐Ÿ“ฃ Report to Slack + uses: 8398a7/action-slack@77eaa4f1c608a7d68b38af4e3f739dcd8cba273e # v3.19.0 with: status: failure text: "<@U08BMRSM8G5> & <@U05UCQ2B0CT>: The beta build for Flutter Video failed. Please check the logs." diff --git a/.github/workflows/pr_labels.yml b/.github/workflows/pr_labels.yml index 28d30b1f7..56b49a994 100644 --- a/.github/workflows/pr_labels.yml +++ b/.github/workflows/pr_labels.yml @@ -22,4 +22,5 @@ permissions: jobs: review_labels: + name: Review Labels uses: ./.github/workflows/pr_review_labels.yml diff --git a/.github/workflows/pr_review_labels.yml b/.github/workflows/pr_review_labels.yml index ea716c9f3..e61239906 100644 --- a/.github/workflows/pr_review_labels.yml +++ b/.github/workflows/pr_review_labels.yml @@ -29,6 +29,7 @@ on: jobs: # The author marked the pull request "ready" again, so review feedback is addressed. drop_pending: + name: Drop the Pending Label if: >- github.event.pull_request.head.repo.full_name == github.repository && github.event.action == 'labeled' && github.event.label.name == 'ready' @@ -63,6 +64,7 @@ jobs: } sync_labels: + name: Sync Review Labels # Reviews by the pull request author or by bots never change the labels, # so they're skipped here and can't cancel a run that does. if: >- diff --git a/.github/workflows/pr_title.yml b/.github/workflows/pr_title.yml index 5e59674ea..a5c044206 100644 --- a/.github/workflows/pr_title.yml +++ b/.github/workflows/pr_title.yml @@ -25,7 +25,8 @@ jobs: runs-on: group: github-public-amd64 steps: - - uses: amannn/action-semantic-pull-request@0723387faaf9b38adef4775cd42cfd5155ed6017 # v5.5.3 + - name: ๐Ÿท๏ธ Check PR Title + uses: amannn/action-semantic-pull-request@0723387faaf9b38adef4775cd42cfd5155ed6017 # v5.5.3 with: scopes: | llc @@ -41,7 +42,8 @@ jobs: runs-on: group: github-public-amd64 steps: - - uses: GetStream/verify-semantic-changelog-update@566b49e5ce5f180280336053428f7e2338a4d496 # v1.1.0 + - name: ๐Ÿ“ Check Changelog Update + uses: GetStream/verify-semantic-changelog-update@566b49e5ce5f180280336053428f7e2338a4d496 # v1.1.0 with: scopes: | { @@ -56,7 +58,9 @@ jobs: # checks that the entries went under `## Upcoming` rather than into a section # for a version that is already published. changelog_placement: + name: Check Changelog Placement runs-on: group: github-public-amd64 steps: - - uses: GetStream/verify-semantic-changelog-update/placement@566b49e5ce5f180280336053428f7e2338a4d496 # v1.1.0 + - name: ๐Ÿ“ Check Changelog Placement + uses: GetStream/verify-semantic-changelog-update/placement@566b49e5ce5f180280336053428f7e2338a4d496 # v1.1.0 diff --git a/.github/workflows/pr_version_labels.yml b/.github/workflows/pr_version_labels.yml index 7ebb383a3..32cd6a0da 100644 --- a/.github/workflows/pr_version_labels.yml +++ b/.github/workflows/pr_version_labels.yml @@ -24,6 +24,7 @@ on: jobs: version_label: + name: Label the Version Bump # Runs when a pull request opens or changes base; other events are ignored, # so it can share a caller with workflows triggered by more events. if: >- diff --git a/.github/workflows/release_publish.yml b/.github/workflows/release_publish.yml index 3b47b9ff1..9cf41ddbb 100644 --- a/.github/workflows/release_publish.yml +++ b/.github/workflows/release_publish.yml @@ -15,6 +15,7 @@ concurrency: jobs: release: + name: Publish to pub.dev # Publishing waits for a flutter-developers approval, and pub.dev only # accepts uploads from this environment. environment: pub.dev diff --git a/.github/workflows/release_tag.yml b/.github/workflows/release_tag.yml index 5e249ef80..c6f87baac 100644 --- a/.github/workflows/release_tag.yml +++ b/.github/workflows/release_tag.yml @@ -12,6 +12,7 @@ concurrency: jobs: release: + name: Tag Unpublished Packages # Manual dispatch, or a commit whose message starts `chore(): release` # (no regex in GH expressions). A manual run tags whatever is unpublished. if: "${{ github.event_name == 'workflow_dispatch' || (startsWith(github.event.head_commit.message, 'chore(') && contains(github.event.head_commit.message, '): release')) }}" diff --git a/.github/workflows/stream_core_flutter_workflow.yml b/.github/workflows/stream_core_flutter_workflow.yml index 7dd89b444..3c6862f90 100644 --- a/.github/workflows/stream_core_flutter_workflow.yml +++ b/.github/workflows/stream_core_flutter_workflow.yml @@ -29,35 +29,35 @@ jobs: env: IS_CI: 'true' steps: - - name: Git Checkout + - name: ๐Ÿ“š Checkout uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 with: persist-credentials: false - - name: Install Flutter + - name: ๐Ÿฆ Install Flutter uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 # v2.23.0 with: cache: true cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }} channel: ${{ env.FLUTTER_CHANNEL }} - - name: Install Tools + - name: ๐Ÿ“ฆ Install Tools run: | flutter pub global activate melos - - name: Bootstrap Workspace + - name: ๐Ÿงฉ Bootstrap Workspace run: melos bootstrap --verbose - - name: Dart Analyze + - name: ๐Ÿ” Dart Analyze run: | melos run analyze - - name: Check barrels and tokens + - name: ๐Ÿงฑ Check Barrels and Tokens run: | melos run check:barrels melos run check:tokens - - name: Check formatting + - name: ๐ŸŽจ Check Formatting run: | melos run format:verify @@ -75,33 +75,33 @@ jobs: env: IS_CI: 'true' steps: - - name: Git Checkout + - name: ๐Ÿ“š Checkout uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 with: persist-credentials: false - - name: Install Flutter + - name: ๐Ÿฆ Install Flutter uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 # v2.23.0 with: cache: true cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }} channel: ${{ env.FLUTTER_CHANNEL }} - - name: Install Tools + - name: ๐Ÿ“ฆ Install Tools run: | flutter pub global activate melos flutter pub global activate remove_from_coverage - - name: Bootstrap Workspace + - name: ๐Ÿงฉ Bootstrap Workspace run: melos bootstrap --verbose - - name: Flutter Test + - name: ๐Ÿงช Flutter Test run: melos run test:all - - name: Collect Coverage + - name: ๐Ÿ“Š Collect Coverage run: melos run coverage:ignore-file --no-select - - name: Upload Coverage + - name: ๐Ÿ“ค Upload Coverage uses: codecov/codecov-action@0fb7174895f61a3b6b78fc075e0cd60383518dac # v5.5.5 with: use_oidc: true diff --git a/.github/workflows/stream_thumbnail_native_builds.yml b/.github/workflows/stream_thumbnail_native_builds.yml index f6014836e..4a839e0df 100644 --- a/.github/workflows/stream_thumbnail_native_builds.yml +++ b/.github/workflows/stream_thumbnail_native_builds.yml @@ -31,126 +31,132 @@ permissions: jobs: android: + name: Build Android timeout-minutes: 20 runs-on: ubuntu-latest defaults: run: working-directory: packages/stream_thumbnail/example steps: - - name: Git Checkout + - name: ๐Ÿ“š Checkout uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 with: persist-credentials: false - - name: Bootstrap Workspace + - name: ๐Ÿงฉ Bootstrap Workspace uses: ./.github/actions/bootstrap with: flutter-channel: ${{ env.FLUTTER_CHANNEL }} - - name: Build APK + - name: ๐Ÿ—๏ธ Build APK run: flutter build apk --debug ios: + name: Build iOS timeout-minutes: 20 runs-on: macos-latest defaults: run: working-directory: packages/stream_thumbnail/example steps: - - name: Git Checkout + - name: ๐Ÿ“š Checkout uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 with: persist-credentials: false - - name: Bootstrap Workspace + - name: ๐Ÿงฉ Bootstrap Workspace uses: ./.github/actions/bootstrap with: flutter-channel: ${{ env.FLUTTER_CHANNEL }} - - name: Build iOS (no codesign) + - name: ๐Ÿ—๏ธ Build iOS (no codesign) run: flutter build ios --debug --no-codesign macos: + name: Build macOS timeout-minutes: 20 runs-on: macos-latest defaults: run: working-directory: packages/stream_thumbnail/example steps: - - name: Git Checkout + - name: ๐Ÿ“š Checkout uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 with: persist-credentials: false - - name: Bootstrap Workspace + - name: ๐Ÿงฉ Bootstrap Workspace uses: ./.github/actions/bootstrap with: flutter-channel: ${{ env.FLUTTER_CHANNEL }} - - name: Build macOS + - name: ๐Ÿ—๏ธ Build macOS run: flutter build macos --debug windows: + name: Build Windows timeout-minutes: 20 runs-on: windows-latest defaults: run: working-directory: packages/stream_thumbnail/example steps: - - name: Git Checkout + - name: ๐Ÿ“š Checkout uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 with: persist-credentials: false - - name: Bootstrap Workspace + - name: ๐Ÿงฉ Bootstrap Workspace uses: ./.github/actions/bootstrap with: flutter-channel: ${{ env.FLUTTER_CHANNEL }} - - name: Build Windows + - name: ๐Ÿ—๏ธ Build Windows run: flutter build windows --debug linux: + name: Build Linux timeout-minutes: 20 runs-on: ubuntu-latest defaults: run: working-directory: packages/stream_thumbnail/example steps: - - name: Git Checkout + - name: ๐Ÿ“š Checkout uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 with: persist-credentials: false - - name: Install Linux Build Dependencies + - name: ๐Ÿ“ฆ Install Linux Build Dependencies run: | sudo apt-get update sudo apt-get install -y ninja-build libgtk-3-dev libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libwebp-dev - - name: Bootstrap Workspace + - name: ๐Ÿงฉ Bootstrap Workspace uses: ./.github/actions/bootstrap with: flutter-channel: ${{ env.FLUTTER_CHANNEL }} - - name: Build Linux + - name: ๐Ÿ—๏ธ Build Linux run: flutter build linux --debug web: + name: Build Web timeout-minutes: 20 runs-on: ubuntu-latest defaults: run: working-directory: packages/stream_thumbnail/example steps: - - name: Git Checkout + - name: ๐Ÿ“š Checkout uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 with: persist-credentials: false - - name: Bootstrap Workspace + - name: ๐Ÿงฉ Bootstrap Workspace uses: ./.github/actions/bootstrap with: flutter-channel: ${{ env.FLUTTER_CHANNEL }} - - name: Build Web + - name: ๐Ÿ—๏ธ Build Web run: flutter build web diff --git a/.github/workflows/sync_style_guides.yml b/.github/workflows/sync_style_guides.yml index 2b9f7518b..d091cb949 100644 --- a/.github/workflows/sync_style_guides.yml +++ b/.github/workflows/sync_style_guides.yml @@ -30,6 +30,7 @@ jobs: # The guides are copied into repositories that have none of this repo's # other files, so a link out of `style_guides/` must fail before merge. check: + name: Check Guide Links runs-on: ubuntu-latest steps: - name: ๐Ÿ“š Git Checkout @@ -46,6 +47,7 @@ jobs: # Only `main` syncs, so a manual run on another branch cannot push its # unreviewed guides into the other repositories with the CI bot's token. sync: + name: Sync to ${{ matrix.repository }} if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' needs: check runs-on: diff --git a/.github/workflows/update_top_level_domains.yml b/.github/workflows/update_top_level_domains.yml index da1e1e679..fe80474e3 100644 --- a/.github/workflows/update_top_level_domains.yml +++ b/.github/workflows/update_top_level_domains.yml @@ -11,6 +11,7 @@ permissions: jobs: update_top_level_domains: + name: Update Top-Level Domains runs-on: group: github-public-amd64 steps: From c572872527e74932379149a24169977dc417d671 Mon Sep 17 00:00:00 2001 From: Sahil Kumar Date: Fri, 27 Nov 2026 17:05:16 +0100 Subject: [PATCH 23/27] ci(repo): close gaps found reviewing the runner moves - 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 --- .github/workflows/detect_changes.yml | 4 +++- .github/workflows/legacy_version_analyze.yml | 9 +++++++-- .github/workflows/pr_web_build.yml | 8 ++++++++ CLAUDE.md | 10 ++++++++++ 4 files changed, 28 insertions(+), 3 deletions(-) diff --git a/.github/workflows/detect_changes.yml b/.github/workflows/detect_changes.yml index ac2f2927a..5946a1c1a 100644 --- a/.github/workflows/detect_changes.yml +++ b/.github/workflows/detect_changes.yml @@ -14,7 +14,9 @@ name: detect_changes # # analyze: # needs: gate -# if: needs.gate.outputs.changed == 'true' +# # Runs when the gate fails too: a skipped required check passes, so +# # skipping then would let a broken gate wave every change through. +# if: ${{ !cancelled() && (needs.gate.result != 'success' || needs.gate.outputs.changed == 'true') }} # # A pull request is compared with its base branch, a push with the commit # before it. A new branch, a push whose previous commit is gone, and any other diff --git a/.github/workflows/legacy_version_analyze.yml b/.github/workflows/legacy_version_analyze.yml index ecf5548de..73ab07188 100644 --- a/.github/workflows/legacy_version_analyze.yml +++ b/.github/workflows/legacy_version_analyze.yml @@ -11,6 +11,9 @@ on: - main - develop pull_request: + # ready_for_review: a draft's skipped check stays green otherwise, so a + # draft marked ready would merge unanalyzed until its next push. + types: [opened, synchronize, reopened, ready_for_review] branches: - main - develop @@ -41,10 +44,12 @@ jobs: # This is to minimize accidentally making changes that break old versions # (which we don't commit to supporting, but don't want to actively break) # without updating the constraints. - # No `name:`: the ruleset requires this check by its job ID. + # No `name:`: the ruleset requires this check by its job ID. Runs when the + # gate fails too: a skipped required check passes, so skipping then would + # let a broken gate wave every pull request through. analyze_legacy_version: needs: gate - if: github.event_name == 'push' || (needs.gate.outputs.changed == 'true' && github.event.pull_request.draft != true) + if: ${{ !cancelled() && (github.event_name == 'push' || needs.gate.result != 'success' || (needs.gate.outputs.changed == 'true' && github.event.pull_request.draft != true)) }} timeout-minutes: 15 runs-on: ubuntu-latest steps: diff --git a/.github/workflows/pr_web_build.yml b/.github/workflows/pr_web_build.yml index c4537b677..2a78632f5 100644 --- a/.github/workflows/pr_web_build.yml +++ b/.github/workflows/pr_web_build.yml @@ -85,6 +85,11 @@ jobs: comment: name: Comment the Link needs: deploy + # Shared with remove_comment and queued, not cancelled, so a late link + # comment can't overwrite "removed" for a build that is already gone. + concurrency: + group: pr-web-comment-${{ github.event.pull_request.number }} + cancel-in-progress: false runs-on: group: github-public-amd64 timeout-minutes: 5 @@ -147,6 +152,9 @@ jobs: remove_comment: name: Update the Comment needs: remove + concurrency: + group: pr-web-comment-${{ github.event.pull_request.number }} + cancel-in-progress: false runs-on: group: github-public-amd64 timeout-minutes: 5 diff --git a/CLAUDE.md b/CLAUDE.md index a0aa838df..f03c5f73b 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -63,6 +63,16 @@ file-type assets. `style_guides/` holds the guides every Stream Flutter SDK follows (today `API_DESIGN.md`). The other SDKs carry a copy: on every change to `main`, the `sync_style_guides` workflow runs `scripts/sync_style_guides.dart` against stream-chat-flutter (`master`), stream-video-flutter (`v2`) and stream-feeds-flutter (`main`), and opens a PR in each whose copy changed. Edit the guides here only. They are self-contained: `STYLE_GUIDE.md` points at them, never the reverse, and a relative link out of `style_guides/` fails the workflow's PR check. A new file in the folder is synced automatically; a new target repository is a new entry in the workflow's matrix. +### CI runners + +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. +- 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. + ### Web deploys The Flutter web demos are hosted at `https://flutter.getstream.io//`, set up in `GetStream/chat` under `infra/flutter-web`: prod at `//`, beta at `//beta/`, and pull requests labeled `build` at `//pr//`. Four composite actions in `.github/actions/` hold what every repository must do the same way, for this repository and for the other SDKs: From e31b3338416c6992e072bd726b3fa511bb6f1b65 Mon Sep 17 00:00:00 2001 From: Sahil Kumar Date: Fri, 27 Nov 2026 17:25:18 +0100 Subject: [PATCH 24/27] docs(repo): point the CI runner notes at commit_artifact Co-Authored-By: Claude Opus 5.5 --- CLAUDE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CLAUDE.md b/CLAUDE.md index f03c5f73b..481c2febb 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -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. From 2019a2cb818368f648a06bb8a9a5e94d6fd46233 Mon Sep 17 00:00:00 2001 From: Sahil Kumar Date: Fri, 27 Nov 2026 17:32:38 +0100 Subject: [PATCH 25/27] ci(repo): pin commit_artifact's bot-commit to #271 and scope its token 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 --- .github/workflows/commit_artifact.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/commit_artifact.yml b/.github/workflows/commit_artifact.yml index 57cb12482..7371a65b9 100644 --- a/.github/workflows/commit_artifact.yml +++ b/.github/workflows/commit_artifact.yml @@ -84,6 +84,8 @@ jobs: 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 @@ -93,7 +95,7 @@ jobs: # By repository path: `./` would resolve against the calling repository. - name: ๐Ÿ“ค Commit id: commit - uses: GetStream/stream-core-flutter/.github/actions/bot-commit@e823bcc597a13dc9b243f53f84eaa06f08f66f97 + uses: GetStream/stream-core-flutter/.github/actions/bot-commit@ab35fa04fb78eabde311daabadc4ecccdbbd677e with: files: ${{ inputs.files }} message: ${{ inputs.message }} From b8fcf2cf7963e8d7ad75bb5f6c5b4142e01f74e4 Mon Sep 17 00:00:00 2001 From: Sahil Kumar Date: Fri, 27 Nov 2026 17:37:08 +0100 Subject: [PATCH 26/27] ci(repo): name update_goldens' checkout and bootstrap steps like the other workflows Co-Authored-By: Claude Opus 5.5 --- .github/workflows/update_goldens.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update_goldens.yml b/.github/workflows/update_goldens.yml index fa83967fb..b275ef222 100644 --- a/.github/workflows/update_goldens.yml +++ b/.github/workflows/update_goldens.yml @@ -12,7 +12,7 @@ jobs: name: Render Goldens runs-on: ubuntu-latest steps: - - name: ๐Ÿ“š Checkout branch + - name: ๐Ÿ“š Checkout uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 with: persist-credentials: false @@ -28,7 +28,7 @@ jobs: - name: ๐Ÿ“ฆ Install Tools run: flutter pub global activate melos - - name: ๐Ÿ”ง Bootstrap Workspace + - name: ๐Ÿงฉ Bootstrap Workspace run: melos bootstrap --verbose - name: ๐Ÿ–ผ๏ธ Update Goldens From 3586351c104a7079d0459e068c7dfba479374886 Mon Sep 17 00:00:00 2001 From: Sahil Kumar Date: Fri, 27 Nov 2026 17:39:20 +0100 Subject: [PATCH 27/27] ci(repo): bound update_goldens' render job and replace older runs on a branch Co-Authored-By: Claude Opus 5.5 --- .github/workflows/update_goldens.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/update_goldens.yml b/.github/workflows/update_goldens.yml index b275ef222..1456bc006 100644 --- a/.github/workflows/update_goldens.yml +++ b/.github/workflows/update_goldens.yml @@ -5,12 +5,19 @@ 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 uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0