-
Notifications
You must be signed in to change notification settings - Fork 38
130 lines (118 loc) · 4.66 KB
/
reviewdog.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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
name: reviewdog
on:
pull_request:
paths:
- '**.tf'
- '**.tfvars'
jobs:
terraformPlanArgocd:
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
ZONE_ID: ${{ secrets.ZONE_ID }}
name: runner / argocd
runs-on: ubuntu-latest
needs: tflint
steps:
- name: Clone repo
uses: actions/checkout@master
- name: Install Terraform
run: |
brew install tfenv
tfenv install ${TERRAFORM_VERSION}
- name: Terraform plan argocd
working-directory: ./examples/argocd
run: |
tfenv use ${TERRAFORM_VERSION}
terraform init --upgrade
terraform plan -var 'cluster_name=swiss-army-github-ci'
terraformPlanArgocdWithApplications:
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
ZONE_ID: ${{ secrets.ZONE_ID }}
name: runner / argocd-with-applications
runs-on: ubuntu-latest
needs: tflint
steps:
- name: Clone repo
uses: actions/checkout@master
- name: Install Terraform
run: |
brew install tfenv
tfenv install ${TERRAFORM_VERSION}
- name: Terraform plan argocd-with-applications
working-directory: ./examples/argocd-with-applications
run: |
tfenv use ${TERRAFORM_VERSION}
terraform init --upgrade
terraform plan -var "zone_id=${ZONE_ID}" -var 'cluster_name=swiss-army-github-ci'
terraformPlanCommon:
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
ZONE_ID: ${{ secrets.ZONE_ID }}
name: runner / common
runs-on: ubuntu-latest
needs: tflint
steps:
- name: Clone repo
uses: actions/checkout@master
- name: Install Terraform
run: |
brew install tfenv
tfenv install ${TERRAFORM_VERSION}
- name: Terraform plan common example
working-directory: ./examples/common
run: |
tfenv use ${TERRAFORM_VERSION}
terraform init --upgrade
terraform plan -var "zone_id=${ZONE_ID}" -var 'cluster_name=swiss-army-github-ci'
infracost:
runs-on: ubuntu-latest
needs: [terraformPlanCommon, terraformPlanArgocdWithApplications, terraformPlanArgocd]
name: Show infracost diff
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Run infracost diff common
continue-on-error: true
uses: infracost/infracost-gh-action@master # Use a specific version instead of master if locking is preferred
env:
INFRACOST_API_KEY: ${{ secrets.INFRACOST_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Do not change
ZONE_ID: ${{ secrets.ZONE_ID }}
# See the cloud credentials section for the options
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
with:
entrypoint: /scripts/ci/diff.sh # Do not change
path: ./examples/common
terraform_plan_flags: -var "zone_id=${ZONE_ID}" -var 'cluster_name=swiss-army-github-ci'
- name: Run infracost diff argocd
continue-on-error: true
uses: infracost/infracost-gh-action@master # Use a specific version instead of master if locking is preferred
env:
INFRACOST_API_KEY: ${{ secrets.INFRACOST_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Do not change
# See the cloud credentials section for the options
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
with:
entrypoint: /scripts/ci/diff.sh # Do not change
path: ./examples/argocd
terraform_plan_flags: -var 'cluster_name=swiss-army-github-ci'
- name: Run infracost diff acgocd-with-applications
continue-on-error: true
uses: infracost/infracost-gh-action@master # Use a specific version instead of master if locking is preferred
env:
INFRACOST_API_KEY: ${{ secrets.INFRACOST_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Do not change
ZONE_ID: ${{ secrets.ZONE_ID }}
# See the cloud credentials section for the options
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
with:
entrypoint: /scripts/ci/diff.sh # Do not change
path: ./examples/argocd-with-applications
terraform_plan_flags: -var "zone_id=${ZONE_ID}" -var 'cluster_name=swiss-army-github-ci'