-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (38 loc) · 1.03 KB
/
deployment.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: deployment
defaults:
run:
working-directory: deployment
on:
push:
branches:
- "main"
pull_request:
branches:
- "main"
jobs:
deploy:
runs-on: ubuntu-20.04
environment: staging
container:
image: hashicorp/terraform:1.4.0
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
volumes:
- .:/deployment
options: --workdir /deployment
steps:
- uses: actions/checkout@v2
- name: tf init
run: |
terraform -chdir=environments/staging init \
-backend-config "bucket=data-inclusion-terraform" \
-backend-config "key=stack_data/staging" \
-backend-config "region=fr-par" \
-backend-config "endpoint=https://s3.fr-par.scw.cloud"
- name: tf validate
run: |
terraform -chdir=environments/staging validate
- name: tf plan
run: |
terraform -chdir=environments/staging plan