-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (31 loc) · 1.03 KB
/
cicd-infra.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
name: cicd-infra
on:
push:
branches: [dev]
paths: 'terraform/**'
workflow_dispatch:
jobs:
apply:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
env:
TETRIS_API: ${{ secrets.TETRIS_API_DEV }}
steps:
- name: Git clone the repository
uses: actions/checkout@v3
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: arn:aws:iam::${{ secrets.AWS_DEV_ACCOUNT_ID }}:role/aws-identity-providers-federation-github-actions
role-session-name: github-actions-dev
aws-region: ap-northeast-1
- name: Setup Terraform
uses: hashicorp/setup-terraform@v1
- name: Terraform Init
run: terraform init
working-directory: ./terraform/environments/dev
- name: Terraform apply
run: terraform apply -auto-approve -var tetris_hostzone_subdomain=${{ secrets.TETRIS_FRONT_DOMAIN_DEV }}
working-directory: ./terraform/environments/dev