diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml new file mode 100644 index 000000000..dadae1bdf --- /dev/null +++ b/.github/workflows/main.yaml @@ -0,0 +1,41 @@ +name: CI/CD [Main] + +on: + push: + branches: + - main + paths: + - ".github/workflows/**" + - "Dockerfile" + - "apps/**" + - "packages/**" + +# This allows a subsequently queued workflow run to interrupt previous runs +concurrency: + group: "${{ github.workflow }} @ ${{ github.ref }}" + cancel-in-progress: true + +jobs: + ci: + name: CI + uses: ./.github/workflows/_ci.yaml + + apps-path-filter: + needs: + - ci + name: + uses: ./.github/workflows/_app-path-filter.yaml + + cd-dev: + needs: + - apps-path-filter + if: ${{ needs.apps-path-filter.outputs.apps == 'true' }} + uses: ./.github/workflows/_cd-dev.yaml + secrets: inherit + + cd-prod: + needs: + - apps-path-filter + if: ${{ needs.apps-path-filter.outputs.apps == 'true' }} + uses: ./.github/workflows/_cd-prod.yaml + secrets: inherit