Skip to content

Commit

Permalink
Fixed docker mulit-platform build. (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
s3rius authored Nov 21, 2024
1 parent e2277cf commit 6fb560b
Showing 1 changed file with 3 additions and 45 deletions.
48 changes: 3 additions & 45 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,6 @@ permissions:
jobs:
release_image:
runs-on: ubuntu-latest
strategy:
matrix:
platform:
- docker_name: linux/amd64
image_tag: amd64
- docker_name: linux/arm64
image_tag: arm64
- docker_name: linux/arm/v7
image_tag: arm7
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -42,46 +33,13 @@ jobs:
with:
context: .
file: ./Dockerfile
platforms: ${{ matrix.platform.docker_name }}
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: ghcr.io/intreecom/robotlb:${{ matrix.platform.image_tag }}-latest,ghcr.io/intreecom/robotlb:${{ matrix.platform.image_tag }}-${{ github.ref_name }}

upload_manifest:
runs-on: ubuntu-latest
needs: [release_image]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Create SHA manifest and push
run: |
docker manifest create \
ghcr.io/intreecom/robotlb:${{ github.ref_name }} \
--amend ghcr.io/intreecom/robotlb:amd64-${{ github.ref_name }} \
--amend ghcr.io/intreecom/robotlb:arm64-${{ github.ref_name }} \
--amend ghcr.io/intreecom/robotlb:arm7-${{ github.ref_name }}
docker manifest push ghcr.io/intreecom/robotlb:${{ github.ref_name }}
- name: Create latest manifest and push
run: |
docker manifest create \
ghcr.io/intreecom/robotlb:latest \
--amend ghcr.io/intreecom/robotlb:amd64-latest \
--amend ghcr.io/intreecom/robotlb:arm64-latest \
--amend ghcr.io/intreecom/robotlb:arm7-latest
docker manifest push ghcr.io/intreecom/robotlb:latest
tags: ghcr.io/intreecom/robotlb:latest,ghcr.io/intreecom/robotlb:${{ github.ref_name }}

upload_helm:
runs-on: ubuntu-latest
needs: [upload_manifest]
needs: [release_image]
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
Expand Down

0 comments on commit 6fb560b

Please sign in to comment.