-
Notifications
You must be signed in to change notification settings - Fork 57
48 lines (37 loc) · 1.23 KB
/
update_goldens.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Update Goldens
on: workflow_dispatch
jobs:
update_goldens:
name: Update Golden Files
runs-on: macos-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: true
cache-key: "flutterCacheV1-:os:-:channel:-:version:-:arch:-:hash:"
pub-cache-key: "flutterPubCacheV1-:os:-:channel:-:version:-:arch:-:hash:"
- name: Setup .env.dev
env:
ENV_FILE: ${{ secrets.ENV_DEV }}
run: echo -n $ENV_FILE | base64 --decode > .env.dev
- name: Activate derry
run: flutter pub global activate derry
- name: Get Dependencies
run: flutter pub get
- name: Run build_runner
run: derry build_runner
- name: Generate Goldens
run: derry test update-goldens
- name: Configure Git
run: |
git config user.name "Github Actions Bot"
git config user.email "<>"
- name: Commit changes
run: git add test/presentation/goldens && git commit -m "Updated golden files"
- uses: nelonoel/[email protected]
- name: Push changes
run: git push origin ${BRANCH_NAME}