Skip to content

Update actions/checkout action to v4 #1140

Update actions/checkout action to v4

Update actions/checkout action to v4 #1140

Workflow file for this run

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@3f54ebb830831fc121d3263c1857cfbdc310cdb9 # v42
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"