Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions .github/workflows/build_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
pull_request:
branches:
- "develop"
workflow_run: # this will get triggered on main branch only
workflow_run:
workflows: ["Linting"]
types:
- completed
Expand All @@ -18,10 +18,12 @@ on:
jobs:
test:
name: Test
# if: github.event.pull_request.draft == false
# uses: ./.github/workflows/_test_with_coverage.yml
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success'}}
if: |
(${{github.event_name == 'pull_request'}} && ${{github.event.action == 'opened'}} && ${{github.event.pull_request.base.ref == 'develop'}}) ||
(${{github.event.workflow_run.conclusion == 'success'}} &&
(${{github.ref == 'refs/heads/main'}} || ${{github.ref == 'refs/heads/develop'}}))
# if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- run: echo "The triggering workflow 'Linting' passed and running tests"
- run: echo "Tests completed."
Expand Down Expand Up @@ -49,6 +51,9 @@ jobs:
- name: Flutter Get Dependencies
run: flutter pub get

- name: Dart Build-runner
run: dart run build_runner build --delete-conflicting-outputs

- name: ⚠️ℹ️ Run Dart analysis
uses: zgosalvez/github-actions-analyze-dart@v3
with:
Expand All @@ -62,7 +67,7 @@ jobs:
IGNORE_GITIGNORED_FILES: true
FILTER_REGEX_EXCLUDE: "\\.freezed\\.dart$"
CREATE_LOG_FILE: true
DISABLE_ERRORS: true
# DISABLE_ERRORS: true

- run: echo "Analyzing completed."

Expand Down
21 changes: 13 additions & 8 deletions .github/workflows/deploy_workflow.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
name: Deploy Apps
on:
# push:
# branches:
# - "main"
# pull_request:
# branches:
# - "main"
push:
branches:
- "main"
pull_request:
branches:
- "main"
workflow_run:
workflows:
- "Test, Analyze, Build"
Expand All @@ -16,16 +16,21 @@ on:
# workflow_dispatch:

jobs:
predeploy:
pre-deploy:
name: Pre-deploy
runs-on: ubuntu-latest
if: github.event.workflow_run.conclusion == 'success'
# if: |
# (${{github.event_name == 'pull_request'}} && ${{github.event.action == 'opened'}} && ${{github.event.pull_request.base.ref == 'main'}}) ||
# (${{github.event.workflow_run.conclusion == 'success'}} && ${{github.ref == 'refs/heads/main'}})
steps:
- run: echo "Predeploy Job Finished"

deploy:
name: Deploy Apps
if: github.event.pull_request.draft == false
uses: ./.github/workflows/_deploy-env-apps.yml
needs: predeploy
needs: pre-deploy
permissions:
contents: write
secrets: inherit
Expand Down