-
Notifications
You must be signed in to change notification settings - Fork 152
39 lines (30 loc) · 893 Bytes
/
format.yml
File metadata and controls
39 lines (30 loc) · 893 Bytes
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
name: Format and push
# Github action will require permission to write to repo
on:
pull_request:
branches:
- main
workflow_dispatch:
jobs:
format:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: true
ref: ${{ github.event.pull_request.head.ref }}
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
- name: Install dependencies
run: flutter pub get
- name: Format Dart code
run: dart format .
- name: git config
run: git config --global --add safe.directory /__w/sdk-for-flutter/sdk-for-flutter # required to fix dubious ownership
- name: Add & Commit
uses: EndBug/add-and-commit@v9.1.4
with:
add: '["lib", "test"]'