-
Notifications
You must be signed in to change notification settings - Fork 1
81 lines (69 loc) · 2.27 KB
/
terratest.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
name: 'Terratest GitHub Actions'
on:
pull_request:
branches:
- master
types: [labeled]
jobs:
DNS:
name: 'Terratest for DNS'
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@master
# Setup gcloud CLI
- name: Auth Gcp
uses: google-github-actions/auth@v1
with:
credentials_json: ${{ secrets.GKE_KEY }}
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v1
- name: 'Terratest Generate Certificate DNS'
if: ${{ github.event.label.name == 'terratest' }}
uses: 'clouddrove/github-actions@v9.0.2'
with:
actions_subcommand: 'terratest'
tf_actions_working_dir: _test/generate-certificate-dns
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: 'Slack Notification'
uses: clouddrove/action-slack@v2
with:
status: ${{ job.status }}
fields: repo,author
author_name: 'CloudDrove'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # required
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_TERRAFORM }} # required
if: always()
Email:
name: 'Terratest for Email'
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@master
# Setup gcloud CLI
- name: Auth Gcp
uses: google-github-actions/auth@v1
with:
credentials_json: ${{ secrets.GKE_KEY }}
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v1
- name: 'Terratest Generate Certificate Email'
if: ${{ github.event.label.name == 'terratest' }}
uses: 'clouddrove/github-actions@v9.0.1'
with:
actions_subcommand: 'terratest'
tf_actions_working_dir: _test/generate-certificate-email
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: 'Slack Notification'
uses: clouddrove/action-slack@v2
with:
status: ${{ job.status }}
fields: repo,author
author_name: 'CloudDrove'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # required
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_TERRAFORM }} # required
if: always()