Skip to content

deps(automated)!: Update theme tokens #1350

deps(automated)!: Update theme tokens

deps(automated)!: Update theme tokens #1350

Workflow file for this run

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:
code-quality:
runs-on: ubuntu-latest
continue-on-error: true
environment: ${{ github.event.pull_request.head.repo.fork == true && 'fork-review' || '' }}
steps:
- uses: actions/checkout@v4
with:
repository: ${{github.event.pull_request.head.repo.full_name}}
ref: ${{ github.head_ref }}
fetch-depth: 0
- uses: subosito/flutter-action@v2
with:
cache: true
channel: stable
flutter-version: 3.35.x
- run: dart pub global activate melos
- name: Release please help
if: startsWith(github.head_ref, 'release-please') && !endsWith(github.head_ref, 'zeta_flutter')
continue-on-error: true
run: |
PACKAGE_NAME=$(echo ${{github.head_ref}} | awk -F '--' '{print $NF}')
bash scripts/update_individual.sh $PACKAGE_NAME
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git add .
git commit -m "deps: update dependencies in $PACKAGE_NAME"
git push origin ${{github.head_ref}} -f
- run: melos exec dart run build_runner build --delete-conflicting-outputs
- run: |
cd widgetbook
flutter pub get
- name: Setup LCOV
uses: hrishikesh-kadam/setup-lcov@v1
- uses: ZebraDevs/flutter-code-quality@main
with:
token: ${{secrets.GITHUB_TOKEN}}
coverage-pass-score: "80"
test-command: melos test
check-secret:
runs-on: ubuntu-latest
environment: ${{ github.event.pull_request.head.repo.fork == true && 'fork-review' || '' }}
outputs:
secret-exists: ${{ steps.check.outputs.defined }}
steps:
- name: Check PR can access secrets
id: check
run: |
echo "defined=true" >> $GITHUB_OUTPUT;
if [ "${{ secrets.FIREBASE_SERVICE_ACCOUNT_ZETA_DS }}" == '' ]; then
echo "defined=false" >> $GITHUB_OUTPUT;
fi
deploy-preview:
name: Deploy preview version of the widgetbook on firebase
environment: ${{ github.event.pull_request.head.repo.fork == true && 'fork-review' || '' }}
needs: [code-quality, check-secret]
if: needs.check-secret.outputs.secret-exists == 'true'
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
channel: stable
flutter-version: 3.35.x
- name: Setup flutter
run: flutter pub get
- name: Build example app
run: |
cd widgetbook
flutter pub get
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_ZETA_DS }}"
channelId: "pr-${{ github.event.number }}-${{ github.event.pull_request.head.ref }}"