Skip to content

Commit 3ef40d4

Browse files
committed
add workflow for merge to main
1 parent 279560a commit 3ef40d4

1 file changed

Lines changed: 52 additions & 0 deletions

File tree

.github/workflows/aws-iac-main.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: AWS IAC
2+
run-name: ${{ github.actor }} is testing out GitHub Actions 🚀
3+
on:
4+
push:
5+
branches:
6+
- main
7+
permissions:
8+
id-token: write
9+
jobs:
10+
core_aws:
11+
defaults:
12+
run:
13+
working-directory: core-env/aws
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v3
17+
- name: Configure AWS Credentials
18+
uses: aws-actions/configure-aws-credentials@main # Or a specific version
19+
with:
20+
role-to-assume: arn:aws:iam::218691292270:role/sedemo-iac-pipeline-role
21+
aws-region: us-west-2
22+
- name: Verify AWS identity
23+
run: |
24+
# Your commands that require AWS credentials
25+
aws sts get-caller-identity
26+
- name: Verify Tofu
27+
uses: opentofu/setup-opentofu@v1
28+
- run: tofu init
29+
- id: apply
30+
run: tofu apply --auto-approve
31+
eks_primary:
32+
needs: core_aws
33+
defaults:
34+
run:
35+
working-directory: core-env/eks-clusters
36+
runs-on: ubuntu-latest
37+
steps:
38+
- uses: actions/checkout@v3
39+
- name: Configure AWS Credentials
40+
uses: aws-actions/configure-aws-credentials@main # Or a specific version
41+
with:
42+
role-to-assume: arn:aws:iam::218691292270:role/sedemo-iac-pipeline-role
43+
aws-region: us-west-2
44+
- name: Verify AWS identity
45+
run: |
46+
# Your commands that require AWS credentials
47+
aws sts get-caller-identity
48+
- name: Verify Tofu
49+
uses: opentofu/setup-opentofu@v1
50+
- run: tofu init
51+
- id: apply
52+
run: tofu apply --auto-approve

0 commit comments

Comments
 (0)