Skip to content

Commit

Permalink
Fix GitHub Action triggers
Browse files Browse the repository at this point in the history
  • Loading branch information
chuckwondo committed Jun 29, 2022
1 parent e83b039 commit 157812e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
- opened
- reopened
- synchronize
- closed
branches:
- main
workflow_dispatch:
Expand Down Expand Up @@ -34,7 +35,7 @@ jobs:
# AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_REGION.
#
deploy-dev:
if: github.event_name == 'workflow_dispatch' && github.event.ref != 'refs/heads/main'
if: github.event_name == 'workflow_dispatch' || github.event.pull_request.merged != true
needs: [unit-tests]
runs-on: ubuntu-20.04
steps:
Expand Down Expand Up @@ -100,14 +101,13 @@ jobs:
bundle exec terraspace all plan
deploy-uat:
if: github.event.ref == 'refs/heads/main'
if: github.event.ref == 'refs/heads/main' && github.event.pull_request.merged == true
needs: [unit-tests]
runs-on: ubuntu-20.04
environment:
name: uat
env:
TS_ENV: uat
CUMULUS_PREFIX: cumulus-uat
steps:
- name: Checkout source
uses: actions/checkout@v2
Expand Down
5 changes: 4 additions & 1 deletion app/stacks/cumulus/config/hooks/terraform.rb
Original file line number Diff line number Diff line change
Expand Up @@ -174,4 +174,7 @@ def call(runner)
execute: %Q[bin/ensure-buckets-exist.sh $(echo "var.buckets" | terraform console | grep '"name" = ' | sed -E 's/.*= "([^"]*)"/\\1/')]
)

after("apply", execute: SetLambdaMemorySizes)
# Technically speaking, we only need to do this after "apply", but we're also
# doing it after "plan" so that we can fail-fast, if there is an issue, and the
# operation is fast and free, so there's no problem doing it twice.
after("plan", "apply", execute: SetLambdaMemorySizes)

0 comments on commit 157812e

Please sign in to comment.