Skip to content

Commit

Permalink
Build and push docker images for multiple platforms in one step (#1067)
Browse files Browse the repository at this point in the history
Co-authored-by: Peyton Murray <[email protected]>
  • Loading branch information
soapy1 and peytondmurray authored Jan 29, 2025
1 parent 16c72be commit cf98a97
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 8 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/build_docker_image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ jobs:
docker-image:
- conda-store
- conda-store-server
platform:
- linux/amd64
- linux/arm64
steps:
- name: "Checkout Repository 🛎"
uses: actions/checkout@v4
Expand All @@ -47,6 +44,16 @@ jobs:
- name: "Set up Docker Buildx 🏗"
uses: docker/setup-buildx-action@v3
# Required for building multi-platform images. See
# https://docs.docker.com/build/ci/github-actions/multi-platform/#build-and-load-multi-platform-images
with:
daemon-config: |
{
"debug": true,
"features": {
"containerd-snapshotter": true
}
}
- name: "Login to Docker Hub 🐳"
uses: docker/login-action@v3
Expand Down Expand Up @@ -92,4 +99,4 @@ jobs:
cache-to: type=gha,mode=max
build-args: |
python_version=${{ env.PYTHON_VERSION_DEFAULT }}
platforms: ${{ matrix.platform }}
platforms: linux/amd64,linux/arm64
15 changes: 11 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,6 @@ jobs:
docker-image:
- conda-store
- conda-store-server
platform:
- linux/amd64
- linux/arm64
steps:
- name: "Checkout Repository 🛎"
uses: actions/checkout@v4
Expand Down Expand Up @@ -150,6 +147,16 @@ jobs:
- name: "Set up Docker Buildx 🏗"
uses: docker/setup-buildx-action@v3
# Required for building multi-platform images. See
# https://docs.docker.com/build/ci/github-actions/multi-platform/#build-and-load-multi-platform-images
with:
daemon-config: |
{
"debug": true,
"features": {
"containerd-snapshotter": true
}
}
- name: "Login to Docker Hub 🐳"
uses: docker/login-action@v3
Expand Down Expand Up @@ -191,5 +198,5 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: ${{ matrix.platform }}
platforms: linux/amd64,linux/arm64
if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags/')

0 comments on commit cf98a97

Please sign in to comment.