Update actions/checkout digest to 11bd719 #1147
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 Linter | |
on: [pull_request] | |
jobs: | |
linter: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Check if Terraform files changed | |
id: terraform-changes | |
uses: tj-actions/changed-files@e9772d140489982e0e3704fea5ee93d536f1e275 # v45 | |
with: | |
files: | | |
terraform/** | |
- name: Tailscale | |
if: steps.terraform-changes.outputs.any_changed == 'true' | |
uses: tailscale/github-action@v2 | |
with: | |
oauth-client-id: ${{ secrets.TS_OAUTH_CLIENT_ID }} | |
oauth-secret: ${{ secrets.TS_OAUTH_SECRET }} | |
tags: tag:clients | |
- name: Clone repo | |
if: steps.terraform-changes.outputs.any_changed == 'true' | |
uses: actions/checkout@master | |
- name: Install Terraform | |
if: steps.terraform-changes.outputs.any_changed == 'true' | |
run: | | |
curl iac.sh/terraform > getinst.sh && \ | |
bash getinst.sh | |
- name: Terraform init | |
if: steps.terraform-changes.outputs.any_changed == 'true' | |
run: | | |
cd terraform && \ | |
terraform init -upgrade -backend-config="conn_str=${{ secrets.tf_con_string }}" | |
- name: tflint | |
if: steps.terraform-changes.outputs.any_changed == 'true' | |
uses: reviewdog/action-tflint@master | |
with: | |
github_token: ${{ secrets.github_token }} | |
working_directory: "terraform" | |
reporter: github-pr-review | |
fail_on_error: "true" | |
flags: "--module" | |
filter_mode: "nofilter" |