Flutter 3.24.3 upgrade #53
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_target: | |
# Pull Request Runs on the same branch will be cancelled | |
concurrency: | |
group: ${{ github.head_ref }} | |
cancel-in-progress: true | |
jobs: | |
set-env: | |
name: "Set environment" | |
runs-on: ubuntu-latest | |
outputs: | |
env: ${{ steps.get_env.outputs.env }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
repository: ${{github.event.pull_request.head.repo.full_name}} | |
ref: ${{ github.head_ref }} | |
- name: Determine Environment | |
id: get_env | |
run: | | |
codeowners=$(cat .github/CODEOWNERS) | |
if [[ $(echo "${codeowners[@]}" | fgrep -w "@${{github.actor}}") ]]; then | |
echo PROWNER | |
echo "env=pr_owner" >> $GITHUB_OUTPUT | |
else | |
echo PR | |
echo "env=pr" >> $GITHUB_OUTPUT | |
fi | |
code-quality: | |
name: Code quality | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
needs: set-env | |
environment: ${{needs.set-env.outputs.env}} | |
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}} | |
run-tests: false | |
run-coverage: false | |
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 }}" |