Skip to content

Commit 5034742

Browse files
aws oidc connectivity test
1 parent b66af8b commit 5034742

1 file changed

Lines changed: 14 additions & 12 deletions

File tree

.github/workflows/main.yml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
1-
name: CICD
2-
1+
name: GitHub AWS OIDC
32
on:
43
push:
5-
branches: [main,master]
4+
branches: [aws-oidc-test]
5+
6+
permissions:
7+
id-token: write
8+
contents: read
69

710
jobs:
8-
build:
11+
oidc-test:
912
runs-on: [ubuntu-latest]
1013
steps:
1114
- name: Checkout Source
12-
uses: actions/checkout@v3
13-
- name: Set Node.js 16.x
14-
uses: actions/setup-node@v3
15+
uses: actions/checkout@v4
16+
- name: Configure AWS Credentials using OIDC
17+
uses: aws-actions/configure-aws-credentials@v4.1.0
1518
with:
16-
node-version: 16.x
17-
- name: Install Dependencies
18-
run : npm install
19-
- name: Test Project
20-
run: npm test
19+
aws-region: ap-south-1
20+
role-to-assume: ${{ secrets.AWS_IAM_ROLE }}
21+
- name: Test AWS Credentials
22+
run: aws sts get-caller-identity

0 commit comments

Comments
 (0)