generated from particuleio/terraform-module-template
-
Notifications
You must be signed in to change notification settings - Fork 0
98 lines (84 loc) · 2.2 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: 'terraform'
on:
push:
branches:
- main
- release
pull_request:
branches:
- main
- release
workflow_dispatch:
jobs:
renovate-config-check:
name: 'renovate:config'
runs-on: ubuntu-20.04
if: github.ref != 'refs/heads/release'
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-node@v4
with:
node-version: '16'
check-latest: true
- name: Install Renovate
run: npm install -g renovate
- name: Check Renovate configuraton
run: renovate-config-validator
terraform-pre-commit:
name: 'terraform:pre-commit'
runs-on: ubuntu-20.04
if: github.ref != 'refs/heads/release'
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-python@v3
- name: 'asdf:install'
uses: asdf-vm/actions/[email protected]
- name: Check modules
uses: pre-commit/[email protected]
with:
extra_args: --show-diff-on-failure --all-files
- name: 'slack:failure'
if: failure()
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
uses: voxmedia/github-action-slack-notify-build@v2
with:
channel: ${{ secrets.SLACK_CHANNEL }}
status: failure
color: danger
terraform-release:
if: github.ref == 'refs/heads/release'
name: 'terraform:release'
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v2
with:
branches: |
[
'release'
]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: 'slack:success'
if: success()
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
uses: voxmedia/github-action-slack-notify-build@v2
with:
channel: ${{ secrets.SLACK_CHANNEL }}
status: SUCCESS
color: good
- name: 'slack:failure'
if: failure()
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
uses: voxmedia/github-action-slack-notify-build@v2
with:
channel: ${{ secrets.SLACK_CHANNEL }}
status: failure
color: danger