-
Notifications
You must be signed in to change notification settings - Fork 4
40 lines (36 loc) · 1.16 KB
/
terraform.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
---
name: Terraform
on:
pull_request:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
terraform-fmt:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@master
- name: Terraform Format
uses: hashicorp/terraform-github-actions@master
with:
tf_actions_version: latest
tf_actions_subcommand: fmt
tf_actions_comment: true
terraform-docs:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.ref }}
continue-on-error: true # added this to prevent a PR from a remote fork failing the workflow
- name: Update module usage docs and push any changes back to PR branch
uses: terraform-docs/[email protected]
with:
args: "--sort --sort-by required"
git-commit-message: "terraform-docs: Update module usage"
git-push: "true"
output-file: README.md
output-method: inject
working-dir: .
continue-on-error: true # added this to prevent a PR from a remote fork failing the workflow