Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
8b74984
ci(repo): run read-only jobs on free standard runners
xsahil03x Nov 27, 2026
7d696a7
ci(repo): keep pinned actions current with Dependabot
xsahil03x Nov 27, 2026
f0dd155
ci(repo): build the iOS thumbnail example on a free macOS runner
xsahil03x Nov 27, 2026
df91fd3
ci(repo): build the macOS thumbnail example on a free macOS runner
xsahil03x Nov 27, 2026
d73ae00
ci(repo): note which runners the shared actions need
xsahil03x Nov 27, 2026
c932a81
ci(repo): let Dependabot update the composite actions' pins
xsahil03x Nov 27, 2026
0bb1dba
ci(repo): tighten token scopes and the coverage upload
xsahil03x Nov 27, 2026
0cf9fa5
ci(repo): compare goldens on the image that renders them
xsahil03x Nov 27, 2026
9f07c60
ci(repo): render goldens on a free runner pinned with the test job
xsahil03x Nov 27, 2026
515e263
ci(repo): render and compare goldens on ubuntu-latest
xsahil03x Nov 27, 2026
f69e443
ci(repo): build and deploy the gallery on free runners
xsahil03x Nov 27, 2026
c84e75b
ci(repo): name the new gallery and golden jobs like the other workflows
xsahil03x Nov 27, 2026
d70ad87
ci(repo): sign gh-pages deploys as the Actions bot, naming the source…
xsahil03x Nov 27, 2026
9782b46
ci(repo): stop publishing the gallery to GitHub Pages
xsahil03x Nov 27, 2026
c8a586f
ci(repo): run the legacy-analysis gate on a free runner
xsahil03x Nov 27, 2026
6033a43
ci(repo): detect the gate's package changes with a two-commit git diff
xsahil03x Nov 27, 2026
3331064
ci(repo): count files moved out of packages/ in the legacy-analysis gate
xsahil03x Nov 27, 2026
7ea042d
ci(repo): detect path changes with a reusable workflow on a free runner
xsahil03x Nov 27, 2026
0e1ff09
ci(repo): name the legacy-analysis gate and its steps like the other …
xsahil03x Nov 27, 2026
1d604e0
ci(repo): give every step an emoji name and every job a name
xsahil03x Nov 27, 2026
c572872
ci(repo): close gaps found reviewing the runner moves
xsahil03x Nov 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/actions/bootstrap/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ inputs:
runs:
using: composite
steps:
- name: Install Flutter
uses: subosito/flutter-action@v2
- 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
Expand All @@ -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
5 changes: 4 additions & 1 deletion .github/actions/bot-commit/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: >
Expand Down Expand Up @@ -52,7 +55,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 }}
Expand Down
7 changes: 4 additions & 3 deletions .github/actions/flutter-web-deploy/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -35,13 +36,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.
Expand Down
5 changes: 3 additions & 2 deletions .github/actions/flutter-web-pr-comment/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -22,7 +23,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 }}
Expand Down
7 changes: 4 additions & 3 deletions .github/actions/flutter-web-remove/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -29,13 +30,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.
Expand Down
2 changes: 2 additions & 0 deletions .github/actions/flutter-web-target/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions .github/actions/package_analysis/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ 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:
MELOS_PACKAGES: stream_**,example

# 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
12 changes: 6 additions & 6 deletions .github/actions/pana/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,26 @@ 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
uses: mikefarah/yq@v4
- 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
uses: subosito/flutter-action@v2
- name: 🐦 Install Flutter
uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 # v2.23.0
with:
cache: true
channel: stable
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: |
Expand Down
20 changes: 20 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# 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"
# "/" 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.
cooldown:
default-days: 7
groups:
all-actions:
patterns: ["*"]
commit-message:
prefix: "chore(deps)"
17 changes: 9 additions & 8 deletions .github/workflows/beta_version_analyze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ 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:
group: github-public-amd64
runs-on: ubuntu-latest
steps:
- name: "Git Checkout"
uses: actions/checkout@v4
- name: 📚 Checkout
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
with:
fetch-depth: 0
persist-credentials: false

- name: "Install Flutter"
uses: subosito/flutter-action@v2
- name: 🐦 Install Flutter
uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 # v2.23.0
with:
channel: beta
cache: true
Expand All @@ -38,7 +38,8 @@ jobs:
needs: [analyze_beta_versions]
if: failure() && github.event_name == 'schedule'
steps:
- uses: 8398a7/action-slack@v3
- 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."
Expand Down
103 changes: 103 additions & 0 deletions .github/workflows/detect_changes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
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@<sha>
# with:
# paths: |
# packages/**
# .github/workflows/my_workflow.yml
#
# analyze:
# needs: gate
# # 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
# 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"
Loading
Loading