forked from hashicorp/terraform-provider-awscc
-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (54 loc) · 1.56 KB
/
tfplugindocs-check.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
58
59
60
61
62
name: Check if tfplugindocs result matches /docs
on:
push:
branches:
- main
- "release/**"
pull_request:
paths:
- .github/workflows/tfplugindocs-check.yml
- .go-version
- .golangci.yml
- go.sum
- GNUmakefile
- internal/**
- main.go
- tools/**
- docs/**
jobs:
tfplugindocs_check:
name: tfplugindocs check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- id: go-version
uses: juliangruber/read-file-action@v1
with:
path: ./.go-version
- uses: actions/setup-go@v3
with:
# TODO: Replace with go-version-from-file when it is supported
# https://github.com/actions/setup-go/pull/62
go-version: ${{ steps.go-version.outputs.content }}
- name: GOCACHE
run: |
echo "GOCACHE=$(go env GOCACHE)" >> $GITHUB_ENV
- uses: actions/cache@v3
continue-on-error: true
timeout-minutes: 2
with:
# TODO: Replace with supported mechanism when it is supported
# https://github.com/actions/setup-go/issues/54
path: ${{ env.GOCACHE }}
key: ${{ runner.os }}-GOCACHE-${{ hashFiles('go.sum') }}-${{ hashFiles('internal/**') }}
- uses: actions/cache@v3
continue-on-error: true
timeout-minutes: 2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-pkg-mod-${{ hashFiles('go.sum') }}
- run: |
make tools
make docs
git add -N docs/
git diff --exit-code