Skip to content

run fix/apply in all packages #1

run fix/apply in all packages

run fix/apply in all packages #1

Workflow file for this run

on:
workflow_dispatch:
push:
jobs:
cancel-previous-workflow:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@b173b6ec0100793626c2d9e6b90435061f4fc3e5 # [email protected]
with:
access_token: ${{ github.token }}
format-and-fix:
name: Format & fix code
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: ${{ matrix.package }}
steps:
- uses: actions/checkout@v3
- uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d # pin@v1
if: ${{ package.package != 'flutter' }}

Check failure on line 28 in .github/workflows/format-and-fix.yml

View workflow run for this annotation

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

Invalid workflow file

The workflow is not valid. .github/workflows/format-and-fix.yml (Line: 28, Col: 13): Unrecognized named-value: 'package'. Located at position 1 within expression: package.package != 'flutter' .github/workflows/format-and-fix.yml (Line: 30, Col: 13): Unrecognized named-value: 'package'. Located at position 1 within expression: package.package == 'flutter'
- uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa # [email protected]
if: ${{ package.package == 'flutter' }}
- run: dart pub get
if: ${{ package.package != 'flutter' }}
- run: flutter pub get
if: ${{ package.package == 'flutter' }}
- run: dart format .
- run: dart fix --apply
# actions/checkout fetches only a single commit in a detached HEAD state. Therefore
# 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