diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d345f144ee..453efc0aae 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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 @@ -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') }} @@ -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 || '' }} @@ -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: |