Skip to content

Commit c4d8d7c

Browse files
committed
update action
1 parent 0abc7a9 commit c4d8d7c

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

.github/workflows/update_goldens.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,16 @@ jobs:
77
runs-on: ubuntu-latest
88
steps:
99
- name: 🚫 Ensure branch is not master
10-
if: ${{ github.event.inputs.branch == 'master' || github.event.inputs.branch == 'origin/master'}}
10+
if: ${{ github.ref == 'refs/heads/master'}}
1111
run: |
1212
echo "Updating goldens on 'master' branch is prohibited."
1313
exit 1
1414
1515
- name: 📚 Checkout branch
1616
uses: actions/checkout@v4
1717
with:
18-
ref: ${{ github.event.inputs.branch }}
18+
ref: ${{ github.ref }}
19+
fetch-depth: 0
1920

2021
- name: 🐦 Install Flutter
2122
uses: subosito/flutter-action@v2
@@ -32,10 +33,8 @@ jobs:
3233
run: melos bootstrap --verbose
3334

3435
- name: 🖼️ Update Goldens
35-
working-directory: packages/stream_chat_flutter
3636
continue-on-error: true
37-
run: |
38-
flutter test --tags golden --update-goldens
37+
run: melos run update:goldens
3938

4039
- name: 📤 Commit Changes
4140
id: commit_changes

melos.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,10 @@ scripts:
159159
flutter: true
160160
dirExists: test
161161

162+
update:goldens:
163+
run: melos exec -c 1 --depends-on="alchemist" -- "flutter test --tags golden --update-goldens"
164+
description: Update golden files for all packages in this project.
165+
162166
clean:flutter:
163167
run: melos exec -c 4 --fail-fast -- "flutter clean"
164168
description: Run Flutter clean for a specific package in this project.

0 commit comments

Comments
 (0)