diff --git a/.github/workflows/build-image.yml b/.github/workflows/build-image.yml index 2b05c6d..42c94b2 100644 --- a/.github/workflows/build-image.yml +++ b/.github/workflows/build-image.yml @@ -10,6 +10,10 @@ on: description: 'The branch to build for staging deployments' default: main type: string + ENABLE_PRODUCTION: + description: 'Build production images based on tags' + default: true + type: boolean env: STG_PROJECT_ID: stg-pro-397609 @@ -21,7 +25,7 @@ env: jobs: docker: runs-on: ubuntu-latest - if: github.event_name == 'push' && (github.ref == 'refs/heads/${{ inputs.BRANCH }}' || startsWith(github.ref, 'refs/tags/')) + if: github.event_name == 'push' && (github.ref == 'refs/heads/${{ inputs.BRANCH }}' || (${{ inputs.ENABLE_PRODUCTION }} && startsWith(github.ref, 'refs/tags/'))) steps: - name: Set environment (Staging) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index c46a329..da93a48 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -10,6 +10,10 @@ on: description: 'The branch to build for staging deployments' default: main type: string + ENABLE_PRODUCTION: + description: 'Deploy production builds based on tags' + default: true + type: boolean env: STG_PROJECT_ID: stg-pro-397609 @@ -21,7 +25,7 @@ env: jobs: docker: runs-on: ubuntu-latest - if: github.event_name == 'push' && (github.ref == 'refs/heads/${{ inputs.BRANCH }}' || startsWith(github.ref, 'refs/tags/')) + if: github.event_name == 'push' && (github.ref == 'refs/heads/${{ inputs.BRANCH }}' || (${{ inputs.ENABLE_PRODUCTION }} && startsWith(github.ref, 'refs/tags/'))) steps: - name: Set environment (Staging)