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:
|
push:
|
||||||
branches: [ "main" ]
|
branches: [ "main" ]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
id-token: write # This is required for requesting the JWT
|
||||||
|
contents: read # This is required for actions/checkout
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
||||||
@@ -31,3 +35,14 @@ jobs:
|
|||||||
- name: Build with Maven
|
- name: Build with Maven
|
||||||
run: mvn -B package --file pom.xml
|
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
|
||||||
|
|
||||||
|
|||||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -18,7 +18,7 @@ target/
|
|||||||
*.iws
|
*.iws
|
||||||
*.iml
|
*.iml
|
||||||
*.ipr
|
*.ipr
|
||||||
application-local.properties
|
src/main/resources/application-local.properties
|
||||||
|
|
||||||
### NetBeans ###
|
### NetBeans ###
|
||||||
/nbproject/private/
|
/nbproject/private/
|
||||||
|
|||||||
Reference in New Issue
Block a user