Skip to content

Commit

Permalink
Fix GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Pante committed Apr 15, 2024
1 parent 2489b5c commit 6747451
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 26 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/forui_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@ on:
- .github/workflows/forui_build.yaml
- forui/**

pull_request:
paths:
- .github/workflows/forui_build.yaml
- forui/**

jobs:
test:
name: Build & test
Expand All @@ -23,6 +18,8 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: subosito/[email protected]
with:
cache: true
- run: flutter pub get
- run: flutter pub run build_runner build --delete-conflicting-outputs
- run: flutter analyze
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/forui_presubmit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@ on:
- .github/workflows/forui_presubmit.yaml
- forui/**

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
prepare:
if: github.actor != 'forus-labs-token-mint[bot]'
if: github.actor != 'forus-labs-token-mint[bot]' && github.event.pull_request.draft == false
name: Prepare PR for review
runs-on: ubuntu-latest
defaults:
Expand All @@ -24,7 +28,7 @@ jobs:
app_id: ${{ secrets.TOKEN_MINT_APP_ID }}
private_key: ${{ secrets.TOKEN_MINT_PRIVATE_KEY }}

- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/checkout@v4
with:
token: ${{ steps.generate-token.outputs.token }}
ref: ${{ github.event.pull_request.head.ref }}
Expand All @@ -33,8 +37,6 @@ jobs:
with:
cache: true

- uses: dart-lang/[email protected]

- run: flutter pub get
- run: flutter pub global activate import_sorter
- run: flutter pub global run import_sorter:main
Expand All @@ -43,5 +45,5 @@ jobs:

- uses: EndBug/add-and-commit@v9
with:
pull: '--rebase --autostash'
add: '*'
push: true
12 changes: 1 addition & 11 deletions .github/workflows/samples_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,6 @@ name: Samples Build
on:
workflow_dispatch: {}
push:
branches:
- master
paths:
- .github/workflows/samples_build.yaml
- forui/**
- samples/**

pull_request:
branches:
- master
paths:
- .github/workflows/samples_build.yaml
- forui/**
Expand All @@ -26,7 +16,7 @@ jobs:
run:
working-directory: samples
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/samples_presubmit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@ on:
- .github/workflows/samples_presubmit.yaml
- samples/**

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
prepare:
if: github.actor != 'forus-labs-token-mint[bot]'
if: github.actor != 'forus-labs-token-mint[bot]' && github.event.pull_request.draft == false
name: Prepare PR for review
runs-on: ubuntu-latest
defaults:
Expand All @@ -24,7 +28,7 @@ jobs:
app_id: ${{ secrets.TOKEN_MINT_APP_ID }}
private_key: ${{ secrets.TOKEN_MINT_PRIVATE_KEY }}

- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/checkout@v4
with:
token: ${{ steps.generate-token.outputs.token }}
ref: ${{ github.event.pull_request.head.ref }}
Expand All @@ -33,8 +37,6 @@ jobs:
with:
cache: true

- uses: dart-lang/[email protected]

- run: flutter pub get
- run: flutter pub global activate import_sorter
- run: flutter pub global run import_sorter:main
Expand All @@ -43,5 +45,5 @@ jobs:

- uses: EndBug/add-and-commit@v9
with:
pull: '--rebase --autostash'
add: '*'
push: true

0 comments on commit 6747451

Please sign in to comment.