Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/on-push-to-main-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
echo TAG_BASE=$TAG_BASE >> $GITHUB_ENV
echo PLUGIN_VERSION=$PLUGIN_VERSION >> $GITHUB_ENV
- name: Build and push container images
uses: docker/build-push-action@v2
uses: docker/build-push-action@v6
with:
build-args: |
pkg_version=${{ env.PLUGIN_VERSION }}
Expand Down
57 changes: 51 additions & 6 deletions .github/workflows/on-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ on:
workflow_dispatch:

env:
ECR_REPO: public.ecr.aws/k1n1h4h4

PUBLIC_REGISTRY: public.ecr.aws/k1n1h4h4
PRIVATE_REGISTRY: 105154636954.dkr.ecr.us-east-1.amazonaws.com

jobs:
build:
name: release
Expand All @@ -32,19 +33,63 @@ jobs:
uses: docker/login-action@v1
with:
registry: public.ecr.aws
env:
AWS_REGION: us-east-1
- name: Setup Push to Public ECR
run: |
export TAG_BASE=${{ env.PUBLIC_REGISTRY }}/$(echo $GITHUB_REPOSITORY | sed s#/#-#)
echo TAG_BASE=$TAG_BASE >> $GITHUB_ENV
- name: Build and push container images
uses: docker/build-push-action@v6
with:
build-args: |
pkg_version=${{ steps.tag.outputs.tag }}
context: .
platforms: linux/amd64,linux/arm64
tags: |
${{ env.TAG_BASE }}:latest
${{ env.TAG_BASE }}:${{steps.tag.outputs.tag}}
push: true
- name: Login to Staging ECR
uses: docker/login-action@v1
with:
registry: ${{ env.PRIVATE_REGISTRY }}
env:
AWS_REGION: us-east-1
- name: Setup Push to ECR
- name: Setup Push to Staging ECR
run: |
export TAG_BASE=${{ env.ECR_REPO }}/$(echo $GITHUB_REPOSITORY | sed s#/#-#)
export TAG_BASE=${{ env.PRIVATE_REGISTRY }}/$(echo $GITHUB_REPOSITORY | sed s#.*/##)
echo TAG_BASE=$TAG_BASE >> $GITHUB_ENV
- name: Build and push container images
uses: docker/build-push-action@v2
- name: Build and push arm image
uses: docker/build-push-action@v6
with:
build-args: |
pkg_version=${{ steps.tag.outputs.tag }}
context: .
platforms: linux/arm64
provenance: false
tags: |
${{ env.TAG_BASE }}:${{steps.tag.outputs.tag}}-arm64
push: true
- name: Build and push amd image
uses: docker/build-push-action@v6
with:
build-args: |
pkg_version=${{ steps.tag.outputs.tag }}
context: .
platforms: linux/amd64
provenance: false
tags: |
${{ env.TAG_BASE }}:${{steps.tag.outputs.tag}}-amd64
push: true
- name: Build and push manifest list
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does this need to be a separate step now?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These all need to be a separate step because to my knowledge, there's no other way to tag the individual architectures in addition to the manifest list.

Images must be pushed to your repository before you create the Docker manifest.

https://docs.aws.amazon.com/AmazonECR/latest/userguide/docker-push-multi-architecture-image.html (this doc link uses docker manifest instead of docker buildx but the same applies)

uses: docker/build-push-action@v6
with:
build-args: |
pkg_version=${{ steps.tag.outputs.tag }}
context: .
platforms: linux/amd64,linux/arm64
provenance: false
tags: |
${{ env.TAG_BASE }}:latest
${{ env.TAG_BASE }}:${{steps.tag.outputs.tag}}
Expand Down