-
Notifications
You must be signed in to change notification settings - Fork 56
47 lines (42 loc) · 1.24 KB
/
docker-build-corretto-slim.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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@v4
- uses: gradle/wrapper-validation-action@v1
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
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