-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (49 loc) · 1.45 KB
/
on-pull-request.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
55
56
57
name: on pull request
on: [pull_request]
permissions:
contents: write
pull-requests: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
plan:
runs-on: ubuntu-latest
name: run terraform plan
env:
GITHUB_TOKEN: ${{ github.token }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: terraform plan
uses: dflook/terraform-plan@a8d7e66e63aff79825a46e3374c4fd66ff9ce543
id: terraform-plan
with:
path: .
var_file: |
test/tfvars/ci.auto.tfvars
docs:
needs: plan
runs-on: ubuntu-latest
name: create readme
steps:
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_SECRET }}
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
token: ${{ steps.generate_token.outputs.token }}
- name: "terraform docs creation"
id: "terraform-docs"
uses: terraform-docs/gh-actions@cfde42f79b15256c71f4b79ae1d6acea0f689952
with:
working-dir: .
config-file: ./test/terraform-docs/.terraform-docs.yml
output-file: terraform-docs.md
output-method: replace
git-push: "true"
continue-on-error: false