Merge pull request #417 from NASA-IMPACT/iss396_snyk_part4 #243
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Cumulus | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- '.github/workflows/**' | |
- 'app/**' | |
- '!app/stacks/cumulus/resources/**' | |
- 'config/**' | |
- 'src/**' | |
- .nvmrc | |
- .yarnrc | |
- yarn.lock | |
pull_request: | |
types: | |
- opened | |
- reopened | |
- synchronize | |
branches: | |
- main | |
paths: | |
- '.github/workflows/**' | |
- 'app/**' | |
- '!app/stacks/cumulus/resources/**' | |
- 'config/**' | |
- 'src/**' | |
- .nvmrc | |
- .yarnrc | |
- yarn.lock | |
defaults: | |
run: | |
shell: bash | |
env: | |
TF_IN_AUTOMATION: 1 | |
jobs: | |
plan-uat: | |
# Run on PR actions on "source" (head) branches (not on main branch) | |
if: github.event.ref != 'refs/heads/main' | |
uses: ./.github/workflows/terraspace.yml | |
with: | |
TS_ENV: uat | |
deploy: false | |
secrets: inherit | |
deploy-uat: | |
# Run only on main branch (on push, including on merged PRs) | |
if: github.event.ref == 'refs/heads/main' | |
uses: ./.github/workflows/terraspace.yml | |
with: | |
TS_ENV: uat | |
deploy: true | |
secrets: inherit | |
deploy-prod: | |
# Run only on main branch (on push, including on merged PRs) | |
if: github.event.ref == 'refs/heads/main' | |
needs: deploy-uat | |
uses: ./.github/workflows/terraspace.yml | |
with: | |
TS_ENV: prod | |
deploy: true | |
secrets: inherit |