Skip to content

cicd-infra

cicd-infra #7

Workflow file for this run

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