From b7afb6b7bd0fac874efb5e76f2aeb25649199a55 Mon Sep 17 00:00:00 2001 From: David John Arnold Jr Date: Thu, 15 Aug 2024 11:52:30 -0700 Subject: [PATCH] Update terraform_plan.yaml --- .github/workflows/terraform_plan.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/terraform_plan.yaml b/.github/workflows/terraform_plan.yaml index 0c3cf66..3a73efd 100644 --- a/.github/workflows/terraform_plan.yaml +++ b/.github/workflows/terraform_plan.yaml @@ -36,6 +36,10 @@ jobs: with: terraform_version: ${{ vars.terraform_version }} + - name: Set output + id: vars + run: echo ::set-output name=short_ref::${GITHUB_REF#refs/*/} + - name: Terraform Format id: fmt run: | @@ -44,7 +48,7 @@ jobs: git config --global user.name '${{ vars.REPO_OWNER }}' git config --global user.email '${{ vars.REPO_OWNER_EMAIL }}' git commit -am "Autoformatting TF Code" - git push + git push origin HEAD:${{ steps.vars.outputs.short_ref }} echo "auto_format=true" >> $GITHUB_ENV fi