-
Notifications
You must be signed in to change notification settings - Fork 2
54 lines (42 loc) · 1.19 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
---
name: Build
on:
pull_request:
branches:
- main
jobs:
build_terraform:
name: Build - Terraform
runs-on: ubuntu-latest
permissions:
contents: write
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: "chore: terraform fmt and terraform-docs"
commit_user_name: github-actions