From 89c810164c725dfcf7f5c8031c04121b52386b5e Mon Sep 17 00:00:00 2001 From: Clemence Kyara Date: Mon, 7 Oct 2024 16:00:09 +0300 Subject: [PATCH] Add workflow to handle merging to main --- .github/workflows/main.yaml | 41 +++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/main.yaml 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