From 7962d2fc9a203a418449996c9702bbfcf6c47dd2 Mon Sep 17 00:00:00 2001 From: furiousme Date: Sun, 20 Oct 2024 21:21:23 +0300 Subject: [PATCH] gh-actions: execute terraform apply only on push to main --- .github/workflows/terraform.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/terraform.yml b/.github/workflows/terraform.yml index b4b2de4..264a87d 100644 --- a/.github/workflows/terraform.yml +++ b/.github/workflows/terraform.yml @@ -42,6 +42,7 @@ jobs: terraform-plan: runs-on: ubuntu-latest needs: terraform-check + if: github.event_name == 'push' && github.ref == 'refs/heads/main' env: TF_VAR_account_id: ${{ secrets.AWS_ACCOUNT_ID }} TF_VAR_gh_username: ${{ secrets.TF_VAR_GH_USERNAME }}