test merge #7
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: linting | |
on: | |
pull_request: | |
types: ['opened', 'reopened', 'synchronize'] | |
workflow_dispatch: | |
permissions: | |
contents: read | |
concurrency: | |
group: linting-${{ github.event.pull_request.head.repo.full_name }}/${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
linting: | |
name: linting | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.21.x | |
check-latest: false | |
token: ${{ secrets.GITHUB_TOKEN }} | |
cache: true | |
- name: Install terrafmt | |
run: go install github.com/katbyte/terrafmt@latest | |
- name: Check current directory | |
run: | | |
pwd | |
ls -al | |
- name: Fix Terraform code with terraform fmt | |
run: terraform fmt -recursive | |
- name: Fix embedded Terraform with terrafmt | |
run: terrafmt fmt . |