Skip to content

Commit 1c6f8aa

Browse files
committed
setup flutter
1 parent fc0be25 commit 1c6f8aa

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/format-and-fix.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,12 @@ jobs:
1919
steps:
2020
- uses: actions/checkout@v3
2121
- uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d # pin@v1
22+
- uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa # [email protected]
23+
2224
- run: dart format .
2325
- run: dart fix --apply
2426

27+
# Source: https://stackoverflow.com/a/58035262
2528
- name: Extract branch name
2629
shell: bash
2730
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
@@ -30,4 +33,5 @@ jobs:
3033
# actions/checkout fetches only a single commit in a detached HEAD state. Therefore
3134
# we need to pass the current branch, otherwise we can't commit the changes.
3235
# GITHUB_HEAD_REF is the name of the head branch. GitHub Actions only sets this for PRs.
33-
- run: ./scripts/commit-formatted-code.sh ${{ steps.extract_branch.outputs.branch }}
36+
- name: Commit & push
37+
run: ./scripts/commit-formatted-code.sh ${{ steps.extract_branch.outputs.branch }}

0 commit comments

Comments
 (0)