ci: Add flutter-code-quality action #41
Workflow file for this run
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: CI - Pull Request | |
on: | |
pull_request: | |
pull_request_target: #TODO: Keep only this | |
jobs: | |
code-quality: | |
name: Code quality | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
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/[email protected] | |
with: | |
token: ${{secrets.GITHUB_TOKEN}} | |
deploy-preview: | |
name: Deploy preview version of the example app on firebase | |
needs: code-quality | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: subosito/flutter-action@v2 | |
- name: Setup flutter | |
run: flutter pub get | |
- name: Build example app | |
run: | | |
cd example | |
flutter build web -o ../build --no-tree-shake-icons | |
- uses: FirebaseExtended/action-hosting-deploy@v0 | |
with: | |
repoToken: "${{ secrets.GITHUB_TOKEN }}" | |
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_ZDS_FLUTTER }}" | |
expires: 7d | |
projectId: zds-c9c24 | |
channelId: "pr-${{ github.event.number }}-${{ github.event.pull_request.head.ref }}" |