Skip to content

Commit

Permalink
run fix/apply in all packages
Browse files Browse the repository at this point in the history
  • Loading branch information
denrase committed Aug 14, 2023
1 parent 3782d61 commit 7bfeb23
Showing 1 changed file with 12 additions and 23 deletions.
35 changes: 12 additions & 23 deletions .github/workflows/format-and-fix.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,6 @@
on:
workflow_dispatch:
inputs:
package:
required: true
type: choice
options:
- dart
- flutter
- dio
- sqflite
- logging
- file
sdk:
required: false
type: choice
default: dart
options:
- dart
- flutter
push:

jobs:
cancel-previous-workflow:
Expand All @@ -33,17 +16,23 @@ jobs:
if: ${{ !startsWith(github.ref, 'refs/heads/release/') }}
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
matrix:
package: [ dart, flutter, dio, sqflite, logging, file ]
defaults:
run:
working-directory: ${{ inputs.package }}
working-directory: ${{ matrix.package }}
steps:
- uses: actions/checkout@v3
- uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d # pin@v1
if: ${{ inputs.sdk == 'dart' }}
if: ${{ package.package != 'flutter' }}
- uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa # [email protected]
if: ${{ inputs.sdk == 'flutter' }}
if: ${{ package.package == 'flutter' }}

- run: ${{ inputs.sdk }} pub get
- run: dart pub get
if: ${{ package.package != 'flutter' }}
- run: flutter pub get
if: ${{ package.package == 'flutter' }}

- run: dart format .

Expand All @@ -53,4 +42,4 @@ jobs:
# we need to pass the current branch, otherwise we can't commit the changes.
# GITHUB_HEAD_REF is the name of the head branch. GitHub Actions only sets this for PRs.
- run: ../scripts/commit-formatted-code.sh $GITHUB_HEAD_REF
if: env.GITHUB_HEAD_REF != null
# if: env.GITHUB_HEAD_REF != null

0 comments on commit 7bfeb23

Please sign in to comment.