test iam sts assume role
This commit is contained in:
15
.github/workflows/workflow.yml
vendored
15
.github/workflows/workflow.yml
vendored
@@ -4,6 +4,10 @@ on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
|
||||
permissions:
|
||||
id-token: write # This is required for requesting the JWT
|
||||
contents: read # This is required for actions/checkout
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
@@ -31,3 +35,14 @@ jobs:
|
||||
- name: Build with Maven
|
||||
run: mvn -B package --file pom.xml
|
||||
|
||||
- name: Configure AWS Credentials
|
||||
id: configure-aws-credentials
|
||||
uses: aws-actions/configure-aws-credentials@v4
|
||||
with:
|
||||
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/${{ secrets.AWS_ROLE }}
|
||||
aws-region: ${{ secrets.AWS_REGION }}
|
||||
|
||||
- name: Get Instance ID
|
||||
id: get_instance_id
|
||||
run: aws ssm start-session --target i-0fc1eb77776dc1758
|
||||
|
||||
|
||||
Reference in New Issue
Block a user