Skip to content

Fixed docker mulit-platform build. #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 21, 2024
Merged
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
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
Loading