Skip to content

Commit

Permalink
making deploy to production optional
Browse files Browse the repository at this point in the history
  • Loading branch information
geekbrother committed Sep 29, 2023
1 parent 48a605d commit 8c02ffd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
1 change: 1 addition & 0 deletions .github/workflows/auto_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,5 @@ jobs:
uses: ./.github/workflows/cd.yml
with:
image_tag: ${{ github.sha }}
deploy_to_prod: false
secrets: inherit
18 changes: 11 additions & 7 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
name: cd
on:
workflow_dispatch:
push:
branches:
- "main"
paths:
- "terraform/**"
release:
types: ["published"]
inputs:
deploy_to_prod:
description: "Deploy to production"
type: boolean
required: true
default: false
workflow_call:
inputs:
deploy_to_prod:
type: boolean
required: false
default: false
image_tag:
type: string
required: true
Expand Down Expand Up @@ -117,6 +120,7 @@ jobs:
TEST_TENANT_ID: ${{ secrets.TEST_TENANT_ID }}

deploy-infra-prod:
if: ${{ inputs.deploy_to_prod }}
runs-on: ubuntu-latest
environment:
name: prod
Expand Down

0 comments on commit 8c02ffd

Please sign in to comment.