Skip to content

Commit 684c195

Browse files
committed
configure AWS credentials
1 parent bbe25d6 commit 684c195

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

.github/workflows/docker-cloud-publish.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,19 @@ name: docker-cloud go publish
22
on: push
33
jobs:
44
publish:
5+
permissions:
6+
id-token: write
57
runs-on: ubuntu-latest
68
defaults:
79
run:
810
working-directory: docker-cloud
911
steps:
1012
- uses: actions/checkout@v3
13+
- name: Configure AWS Credentials
14+
uses: aws-actions/configure-aws-credentials@v1
15+
with:
16+
role-to-assume: arn:aws:iam::464590638146:role/GitHubActionECRPublicPushImage
17+
aws-region: us-east-1
1118
- name: Login to Amazon ECR Public
1219
id: login-ecr-public
1320
uses: aws-actions/amazon-ecr-login@v1

docker-cloud/IMPLEMENTATION.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,3 +118,14 @@ And:
118118
cache-dependency-path: "docker-cloud/go.sum"
119119
cache: true
120120
```
121+
122+
### Action to publish image
123+
124+
This is complex.
125+
126+
[Guide here](https://benoitboure.com/securely-access-your-aws-resources-from-github-actions) was very helpful.
127+
128+
Actions used:
129+
130+
- https://github.com/aws-actions/configure-aws-credentials
131+
- https://github.com/aws-actions/amazon-ecr-login

0 commit comments

Comments
 (0)