Arhum: added OpenAPI yaml spec (#3) #16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Flutter CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
types: | |
- opened | |
- synchronize | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: stable | |
- name: Verify flutter version | |
run: flutter --version | |
- name: Lint code | |
run: cd frontend && flutter analyze | |
- name: Reformat code | |
run: dart format . | |
- name: Commit changes if any | |
if: github.ref == 'refs/heads/main' | |
run: | | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
git add . | |
git diff --cached --quiet || git commit -m "Auto-format: Applied Flutter formatting" | |
git push |