3939 - name : Set up Docker Buildx
4040 uses : docker/setup-buildx-action@v2
4141
42+ - name : Configure AWS credentials
43+ uses : aws-actions/configure-aws-credentials@v1
44+ with :
45+ aws-region : ${{ secrets.AWS_REGION }}
46+ aws-access-key-id : ${{ secrets.AWS_ACCESS_KEY_ID }}
47+ aws-secret-access-key : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
48+
49+ - name : Login to Amazon ECR
50+ uses : aws-actions/amazon-ecr-login@v1
51+ with :
52+ registry-type : public
53+
4254 - name : Login to Docker Hub
4355 uses : docker/login-action@v2
4456 with :
5264 username : ${{ github.actor }}
5365 password : ${{ secrets.GITHUB_TOKEN }}
5466
67+ - name : Build and push NGINX mainline Alpine image to Amazon ECR
68+ uses : docker/build-push-action@v3
69+ with :
70+ platforms : linux/amd64, linux/arm/v6, linux/arm/v7, linux/arm64, linux/386, linux/ppc64le, linux/s390x
71+ context : " {{ defaultContext }}:mainline/alpine"
72+ tags : public.ecr.aws/nginx/nginx-unprivileged:${{ needs.version.outputs.major }}.${{ needs.version.outputs.minor }}.${{ needs.version.outputs.patch }}-alpine, public.ecr.aws/nginx/nginx-unprivileged:mainline-alpine, public.ecr.aws/nginx/nginx-unprivileged:1-alpine, public.ecr.aws/nginx/nginx-unprivileged:${{ needs.version.outputs.major }}.${{ needs.version.outputs.minor }}-alpine, public.ecr.aws/nginx/nginx-unprivileged:alpine
73+ push : true
74+ cache-from : type=gha,scope=alpine
75+ cache-to : type=gha,mode=max,scope=alpine
76+
5577 - name : Build and push NGINX mainline Alpine image to Docker Hub
5678 id : build
5779 uses : docker/build-push-action@v3
@@ -112,6 +134,18 @@ jobs:
112134 - name : Set up Docker Buildx
113135 uses : docker/setup-buildx-action@v2
114136
137+ - name : Configure AWS credentials
138+ uses : aws-actions/configure-aws-credentials@v1
139+ with :
140+ aws-region : ${{ secrets.AWS_REGION }}
141+ aws-access-key-id : ${{ secrets.AWS_ACCESS_KEY_ID }}
142+ aws-secret-access-key : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
143+
144+ - name : Login to Amazon ECR
145+ uses : aws-actions/amazon-ecr-login@v1
146+ with :
147+ registry-type : public
148+
115149 - name : Login to Docker Hub
116150 uses : docker/login-action@v2
117151 with :
@@ -125,6 +159,16 @@ jobs:
125159 username : ${{ github.actor }}
126160 password : ${{ secrets.GITHUB_TOKEN }}
127161
162+ - name : Build and push NGINX mainline perl Alpine image to Amazon ECR
163+ uses : docker/build-push-action@v3
164+ with :
165+ platforms : linux/amd64, linux/arm/v6, linux/arm/v7, linux/arm64, linux/386, linux/ppc64le, linux/s390x
166+ context : " {{ defaultContext }}:mainline/alpine-perl"
167+ tags : public.ecr.aws/nginx/nginx-unprivileged:${{ needs.version.outputs.major }}.${{ needs.version.outputs.minor }}.${{ needs.version.outputs.patch }}-alpine-perl, public.ecr.aws/nginx/nginx-unprivileged:mainline-alpine-perl, public.ecr.aws/nginx/nginx-unprivileged:1-alpine-perl, public.ecr.aws/nginx/nginx-unprivileged:${{ needs.version.outputs.major }}.${{ needs.version.outputs.minor }}-alpine-perl, public.ecr.aws/nginx/nginx-unprivileged:alpine-perl
168+ push : true
169+ cache-from : type=gha,scope=alpine-perl
170+ cache-to : type=gha,mode=max,scope=alpine-perl
171+
128172 - name : Build and push NGINX mainline perl Alpine image to Docker Hub
129173 id : build
130174 uses : docker/build-push-action@v3
@@ -185,6 +229,18 @@ jobs:
185229 - name : Set up Docker Buildx
186230 uses : docker/setup-buildx-action@v2
187231
232+ - name : Configure AWS credentials
233+ uses : aws-actions/configure-aws-credentials@v1
234+ with :
235+ aws-region : ${{ secrets.AWS_REGION }}
236+ aws-access-key-id : ${{ secrets.AWS_ACCESS_KEY_ID }}
237+ aws-secret-access-key : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
238+
239+ - name : Login to Amazon ECR
240+ uses : aws-actions/amazon-ecr-login@v1
241+ with :
242+ registry-type : public
243+
188244 - name : Login to Docker Hub
189245 uses : docker/login-action@v2
190246 with :
@@ -198,6 +254,16 @@ jobs:
198254 username : ${{ github.actor }}
199255 password : ${{ secrets.GITHUB_TOKEN }}
200256
257+ - name : Build and push NGINX mainline slim Alpine image to Amazon ECR
258+ uses : docker/build-push-action@v3
259+ with :
260+ platforms : linux/amd64, linux/arm64
261+ context : " {{ defaultContext }}:mainline/alpine-slim"
262+ tags : public.ecr.aws/nginx/nginx-unprivileged:${{ needs.version.outputs.major }}.${{ needs.version.outputs.minor }}.${{ needs.version.outputs.patch }}-alpine-slim, public.ecr.aws/nginx/nginx-unprivileged:mainline-alpine-slim, public.ecr.aws/nginx/nginx-unprivileged:1-alpine-slim, public.ecr.aws/nginx/nginx-unprivileged:${{ needs.version.outputs.major }}.${{ needs.version.outputs.minor }}-alpine-slim, public.ecr.aws/nginx/nginx-unprivileged:alpine-slim
263+ push : true
264+ cache-from : type=gha,scope=alpine-slim
265+ cache-to : type=gha,mode=max,scope=alpine-slim
266+
201267 - name : Build and push NGINX mainline slim Alpine image to Docker Hub
202268 id : build
203269 uses : docker/build-push-action@v3
0 commit comments