Bump aws-actions/configure-aws-credentials from 2 to 3 (#523) #20
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Correto Build | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- scripts/docker/corretto-slim/** | |
- .github/workflows/docker-build-corretto-slim.yml | |
env: | |
AWS_DEFAULT_REGION: us-east-1 | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
build-corretto: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: gradle/wrapper-validation-action@v1 | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v3 | |
with: | |
role-to-assume: ${{ secrets.AWS_ASSUME_ROLE_ARN }} | |
aws-region: ${{ env.AWS_DEFAULT_REGION }} | |
- name: Log in to AWS ECR | |
uses: docker/login-action@v2 | |
with: | |
registry: public.ecr.aws | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Build docker image | |
uses: docker/build-push-action@v4 | |
with: | |
push: true | |
context: scripts/docker/corretto-slim | |
platforms: linux/amd64,linux/arm64 | |
tags: | | |
public.ecr.aws/u0d6r4y4/amazoncorretto-distroless:alpha | |
cache-from: type=registry,ref=user/app:latest | |
cache-to: type=inline |