Module - AWS Amplify #518
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: Build | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build_terraform: | |
name: Build - Terraform | |
runs-on: ubuntu-latest | |
steps: | |
- name: HashiCorp - Setup Terraform | |
uses: hashicorp/setup-terraform@v3 | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.ref }} | |
- name: List all files | |
run: ls -lha | |
- name: stat .git/objects | |
run: stat .git/objects | |
- name: Terraform fmt on all files | |
id: fmt | |
run: terraform fmt -recursive | |
- name: Build terraform docs | |
uses: terraform-docs/gh-actions@v1 | |
with: | |
config-file: ./modules/.terraform-docs.yml | |
find-dir: ./modules | |
- name: List all files | |
run: ls -lha | |
- name: stat .git/objects | |
run: stat .git/objects | |
- name: Fix .git owner | |
run: sudo chown runner:docker -R .git | |
- name: Git stage all, commit, and push | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: Continuous Integration - terraform fmt and terraform-docs |