forked from scribd/terraform-aws-datadog
-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (44 loc) · 1.09 KB
/
terraform_and_release.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
name: 'CICD'
on:
push:
pull_request:
jobs:
terraform:
name: 'Terraform'
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@master
- uses: hashicorp/setup-terraform@v1
with:
terraform_version: 0.13.x
- run: terraform fmt
- run: terraform init
- name: 'Inject provider configs for validate command'
run: |
cat > providers.tf <<EOF
provider "aws" {
region = "us-east-2"
}
provider "datadog" {
api_key = ""
app_key = ""
}
EOF
- run: terraform validate
release:
if: github.event_name == 'push'
needs: terraform
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Semantic Release
id: semantic
uses: cycjimmy/semantic-release-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
semantic_version: 19
extra_plugins: |
@semantic-release/changelog@6
@semantic-release/git@10