Skip to content

Commit

Permalink
Run tf apply step only on merge to main. Closes #6
Browse files Browse the repository at this point in the history
  • Loading branch information
altmas5 committed Apr 3, 2023
1 parent 5bf4558 commit 8e2ade1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:
- name: Terraform apply
id: apply
if: github.ref == 'refs/heads/"main"' && github.event_name == 'push'
if: github.ref == 'refs/heads/main' && github.event.pull_request.merged == true
run: |
terraform apply --auto-approve -no-color \
-var "civo_api_token=${{ secrets.CIVO_API_TOKEN }}"
Expand Down

0 comments on commit 8e2ade1

Please sign in to comment.