-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make this action compatible with aws-actions/configure-aws-credentials #20
Comments
@dbuades This action already handles AWS Elastic Container Registry (ECR): - name: Login to Amazon ECR
uses: docker/login-action@v1
with:
registry: ${{ secrets.ECR_REGISTRY }}
username: ${{ secrets.ACCESS_KEY_ID }}
password: ${{ secrets.SECRET_ACCESS_KEY }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
... If |
Yes, that's what I meant, we need roles on our side and unfortunately this action doesn't support them. |
My bad I read it wrong. Something like this should work in the meantime: - name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.DEFAULT_REGION }}
role-to-assume: ${{ secrets.ROLE_ARN }}
role-duration-seconds: 1200
role-session-name: GithubActions
- name: Login to Amazon ECR
uses: docker/login-action@v1
with:
registry: ${{ secrets.ECR_REGISTRY }}
username: ${{ secrets.ACCESS_KEY_ID }}
password: ${{ secrets.SECRET_ACCESS_KEY }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
... Env vars exported by |
That was really really quick, thanks! |
Behaviour
The official AWS action for setting up credentials works very well for assuming roles. Ideally, this action should be compatible with it. We have been using https://github.com/aws-actions/amazon-ecr-login for logging in, but it is not compatible with your new https://github.com/docker/build-push-action.
Something like this would be very useful:
What do you think? Is there a known workaround to accomplish this? Thanks in advance!
The text was updated successfully, but these errors were encountered: