name: Main on: push: branches: - main jobs: changes: uses: ./.github/workflows/changes.yaml build-api: if: ${{ needs.changes.outputs.api == 'true' }} name: build-api needs: - changes uses: ./.github/workflows/api_build.yaml with: environment_name: test version_number: ${{ github.run_id }} secrets: inherit deploy-api: name: deploy-api needs: - changes - build-api uses: ./.github/workflows/api_deploy.yaml with: app_name: root-api environment_name: test version_number: ${{ github.run_id }} secrets: inherit build-deploy-app: if: ${{ needs.changes.outputs.app == 'true' }} name: build-deploy-app needs: - changes uses: ./.github/workflows/app_build_deploy.yaml with: environment_name: test secrets: inherit