Skip to content

Commit

Permalink
feat: Push changes back onto branch
Browse files Browse the repository at this point in the history
  • Loading branch information
thelukewalton committed Jun 26, 2024
1 parent 7057abf commit 4c2274e
Show file tree
Hide file tree
Showing 12 changed files with 134 additions and 287 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,23 @@ jobs:
with:
repository: ${{github.event.pull_request.head.repo.full_name}}
ref: ${{ github.head_ref }}
- uses: subosito/flutter-action@v2
with:
cache: true
- uses: actions/setup-node@v4
with:
node-version: "20.x"
- run: npm i
- run: yes | npx @vercel/ncc build src/main.ts
- name: setup flutter test repos
run: |
cd tests/fail_repo
flutter pub get
cd ../pass_repo
flutter pub get
cd ../..
- name: run tests
run: npm run test
- name: Check for modified files
id: git-check
run: echo "modified=$(if [ -n "$(git status --porcelain)" ]; then echo "true"; else echo "false"; fi)" >> $GITHUB_ENV
Expand All @@ -25,5 +37,5 @@ jobs:
git config --global user.name "github-actions"
git config --global user.email "[email protected]"
git add -A
git commit -m '[automated commit] lint format and import sort'
git commit -m 'ci(automated commit): lint format and import sort'
git push
27 changes: 24 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,27 @@
# flutter-code-quality

### Making changes
An action that runs on PRs to format and test Flutter repos.

Use ncc to output, not tsc or others.
`ncc build src/main.ts`
### Usage

```yml
name: Pull Request

on:
pull_request:

jobs:
code-quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
repository: ${{github.event.pull_request.head.repo.full_name}}
ref: ${{ github.head_ref }}
- uses: subosito/flutter-action@v2
with:
cache: true
- uses: ZebraDevs/flutter-code-quality@main
with:
token: ${{secrets.GITHUB_TOKEN}}
```
265 changes: 0 additions & 265 deletions build/build.js

This file was deleted.

Loading

0 comments on commit 4c2274e

Please sign in to comment.