Skip to content

Commit 3459288

Browse files
theneelshahNeel Shah
andauthored
Replace static credentials with OIDC in docker publish workflow (#774)
Co-authored-by: Neel Shah <neeljs@amazon.com>
1 parent 1ee121b commit 3459288

1 file changed

Lines changed: 4 additions & 11 deletions

File tree

.github/workflows/docker_publish.yml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,15 @@ jobs:
1919
build-and-push-image:
2020
runs-on: ubuntu-latest
2121
permissions:
22+
id-token: write
2223
contents: read
23-
packages: write
24-
2524
steps:
2625
- name: Checkout
2726
uses: actions/checkout@v3
2827

2928
- name: Get package version
30-
uses: tyankatsu0105/read-package-version-actions@v1
31-
with:
32-
path: "./src/graph_notebook/widgets"
3329
id: package-version
30+
run: echo "version=$(jq -r .version ./src/graph_notebook/widgets/package.json)" >> $GITHUB_OUTPUT
3431

3532
- name: Get image tag
3633
id: get-image-tag
@@ -46,14 +43,10 @@ jobs:
4643
fi
4744
4845
- name: Configure AWS Credentials
49-
uses: aws-actions/configure-aws-credentials@v1
46+
uses: aws-actions/configure-aws-credentials@7474bc4690e29a8392af63c5b98e7449536d5c3a
5047
with:
51-
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_ECR }}
52-
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_ECR }}
48+
role-to-assume: arn:aws:iam::967107632117:role/graph-notebook-ecr-publish
5349
aws-region: us-east-1
54-
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME_ECR }}
55-
role-duration-seconds: 3600
56-
role-session-name: NotebookImageUpdate
5750

5851
- name: Login to Amazon ECR
5952
id: login-ecr-public

0 commit comments

Comments
 (0)