-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (28 loc) · 831 Bytes
/
deploy.yml
File metadata and controls
37 lines (28 loc) · 831 Bytes
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
name: Full Infra Deployment with OIDC
on:
push:
branches:
- main
permissions:
id-token: write # REQUIRED for OIDC
contents: read
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Configure AWS credentials via OIDC
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::011664843975:role/github-permissions
aws-region: ap-south-1
- name: Verify identity
run: aws sts get-caller-identity
- name: Setup Terraform
uses: hashicorp/setup-terraform@v2
with:
terraform_version: 1.7.3 # or latest stable
- name: Terraform Init
run: terraform init
- name: Terraform Apply
run: terraform apply -auto-approve