forked from clouddrove/terraform-digitalocean-vpc
-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (41 loc) · 1.24 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
name: 'Terraform GitHub Actions'
on:
pull_request:
branches:
- master
jobs:
terraform:
name: 'Terraform'
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@master
- name: 'Terraform Format'
uses: 'clouddrove/github-actions@v9.0.1'
with:
actions_subcommand: 'fmt'
- name: 'Terraform init'
uses: 'clouddrove/github-actions@v9.0.1'
with:
actions_subcommand: 'init'
tf_actions_working_dir: ./_example
- name: 'Terraform validate'
uses: 'clouddrove/github-actions@v9.0.1'
with:
actions_subcommand: 'validate'
tf_actions_working_dir: ./_example
- name: 'Terraform plan'
uses: 'clouddrove/github-actions@v9.0.1'
with:
actions_subcommand: 'plan'
tf_actions_working_dir: ./_example
- 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()