Skip to content

Commit

Permalink
Add build for AWS Marketplace (#2556)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucacome committed Apr 6, 2022
1 parent 95fd169 commit 740dd9c
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -436,9 +436,14 @@ jobs:
matrix:
image: [debian-plus, alpine-plus, opentracing-plus]
platforms: ["linux/arm64, linux/amd64"]
target: [goreleaser]
include:
- image: ubi-plus
platforms: "linux/arm64, linux/amd64, linux/s390x"
target: goreleaser
- image: debian-plus
platforms: "linux/arm64, linux/amd64"
target: aws
steps:
- name: Checkout Repository
uses: actions/checkout@v3
Expand All @@ -463,6 +468,13 @@ jobs:
username: _json_key
password: ${{ secrets.GCR_JSON_KEY }}
if: github.event_name != 'pull_request'
- name: Login to ECR
uses: docker/login-action@v1
with:
registry: 709825985650.dkr.ecr.us-east-1.amazonaws.com
username: ${{ secrets.AWS_ACCESS_KEY_ID }}
password: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
if: startsWith(github.ref, 'refs/tags/')

- name: Docker meta
id: meta
Expand All @@ -471,8 +483,9 @@ jobs:
images: |
${{ startsWith(github.ref, 'refs/tags/') && 'gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/release/nginx-ic/nginx-plus-ingress' || '' }}
${{ startsWith(github.ref, 'refs/heads/release') && 'gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/staging/nginx-ic/nginx-plus-ingress' || '' }}
${{ startsWith(github.ref, 'refs/tags/') && contains(matrix.target, 'aws') && '709825985650.dkr.ecr.us-east-1.amazonaws.com/nginx/nginx-plus-ingress' || '' }}
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress
flavor: suffix=${{ contains(matrix.image, 'ubi') && '-ubi' || '' }}${{ contains(matrix.image, 'alpine') && '-alpine' || '' }}${{ contains(matrix.image, 'opentracing') && '-ot' || '' }},onlatest=true
flavor: suffix=${{ contains(matrix.image, 'ubi') && '-ubi' || '' }}${{ contains(matrix.image, 'alpine') && '-alpine' || '' }}${{ contains(matrix.image, 'opentracing') && '-ot' || '' }}${{ contains(matrix.target, 'aws') && '-mktpl' || '' }},onlatest=true
tags: |
type=edge
type=ref,event=branch,enable=${{ startsWith(github.ref, 'refs/heads/release') }}
Expand Down Expand Up @@ -503,7 +516,7 @@ jobs:
context: '.'
cache-from: type=gha,scope=${{ matrix.image }}
cache-to: type=gha,scope=${{ matrix.image }},mode=max
target: goreleaser
target: ${{ matrix.target }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: ${{ github.event_name != 'pull_request' && matrix.platforms || '' }}
Expand All @@ -522,7 +535,7 @@ jobs:
file: build/Dockerfile
context: '.'
cache-from: type=gha,scope=${{ matrix.image }}
target: goreleaser
target: ${{ matrix.target }}
tags: docker.io/${{ matrix.image }}:${{ steps.meta.outputs.version }}
load: true
build-args: |
Expand Down

0 comments on commit 740dd9c

Please sign in to comment.