Skip to content

Commit

Permalink
Refactor actions to deploy on successful merge to main
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeheft committed Jul 7, 2024
1 parent bd682aa commit 398e116
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/terraform_and_deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
terraform:
name: Terraform Plan and Apply
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' && contains(github.event.pull_request.changed_files, 'terraform/') }}
if: github.event_name == 'pull_request' && github.event.pull_request.merged == true && contains(github.event.pull_request.changed_files, 'terraform/')

steps:
- name: Checkout code
Expand Down Expand Up @@ -39,7 +39,7 @@ jobs:
needs: [terraform]

if: |
always() && ${{needs.terraform.result == 'success'}} || ${{needs.terraform.result == 'skipped'}}
always() && needs.terraform.result == 'success' || needs.terraform.result == 'skipped'
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand Down

0 comments on commit 398e116

Please sign in to comment.