Skip to content

Commit

Permalink
fix: fail the pipeline if terraform fmt -check exists with non zero code
Browse files Browse the repository at this point in the history
  • Loading branch information
monteiro-renato committed Dec 19, 2024
1 parent 8024b9a commit 1279f80
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/altinn-monitor-test-rg-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
uses: actions/checkout@v4

- name: Terraform Plan
uses: altinn/altinn-platform/actions/terraform/plan@main
uses: altinn/altinn-platform/actions/terraform/plan@fix/fail-the-pipeline-if-fmt-check-fails
with:
working_directory: ${{ env.TF_PROJECT }}
oidc_type: environment
Expand Down
4 changes: 1 addition & 3 deletions actions/terraform/plan/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ runs:
shell: bash
if: always()
working-directory: ${{ inputs.working_directory }}
continue-on-error: true
run: terraform fmt -check

- name: Terraform Init
Expand Down Expand Up @@ -206,7 +205,6 @@ runs:
shell: bash
working-directory: ${{ inputs.working_directory }}
run: cat summary.md >> $GITHUB_STEP_SUMMARY

- name: GitHub Issue
id: issue_number
uses: actions/github-script@v7
Expand All @@ -227,7 +225,7 @@ runs:
if (prs.data.length > 0)
{
return prs.data[0].number;
}
}
return null;
}
Expand Down

0 comments on commit 1279f80

Please sign in to comment.