Add mono repo push allowances, fixes #85 #78
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Terraform checks" | |
on: | |
pull_request: | |
paths-ignore: | |
- .gitignore | |
- "*.md" | |
- CODEOWNERS | |
branches: | |
- main | |
jobs: | |
terraform-checks: | |
name: "Terraform checks" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get pull request ref | |
id: sha | |
uses: actions/github-script@v7 | |
with: | |
result-encoding: string | |
script: | | |
const { owner, repo, number } = context.issue; | |
const pr = await github.rest.pulls.get({ | |
owner, | |
repo, | |
pull_number: number, | |
}); | |
return pr.data.head.sha | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ steps.sha.outputs.result }} | |
- name: Setup Terraform | |
uses: hashicorp/setup-terraform@v3 | |
- name: Terraform Format | |
id: fmt | |
run: terraform fmt -check -diff | |
- name: Terraform Init | |
id: init | |
run: terraform init -backend=false | |
- name: Terraform Validate | |
id: validate | |
run: terraform validate -no-color |