Files
flutter/.github/workflows/files-changed.yml
Matan Lurey cc9c13e009 Experiment with a files-changed.json per PR (#161788)
This is an experiment to determine what the wall time of a (minimal)
"upload a JSON file describing files changed".

We are looking for this to take (low) single digit minutes, because if
we use this file (and expand it to become a build plan), it will block
almost _all_ other actions, and will likely get longer as we add more
complex logic and checks. Here's hoping!
2025-01-22 20:22:30 +00:00

38 lines
1.1 KiB
YAML

name: Generate Changed Files JSON
on:
pull_request:
types:
- opened
- synchronize
jobs:
generate-json:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Fetch base commit and origin/master
# Fetch what to compare the commit against
run: |
git fetch --no-tags --prune --depth=1 origin ${{ github.event.pull_request.base.sha }}
git fetch --no-tags --prune --depth=1 origin master
echo "FLUTTER_ENGINE_VERSION=${{ github.event.pull_request.base.sha }}" >> "$GITHUB_ENV"
- name: Initialize Dart SDK
# This downloads the version of the Dart SDK for the current platform.
run: |
./bin/dart --version
cd dev/tools && ../../bin/dart pub get
- name: Write changed files to a JSON file
run: |
./bin/dart run dev/tools/bin/get_files_changed.dart --since="${{ github.event.pull_request.base.sha }}" > changed_files.json
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: changed-files
path: changed_files.json