Skip to content

Commit

Permalink
fix(ci/publish): multi-arch build
Browse files Browse the repository at this point in the history
Fuck you docker (╯°□°)╯︵ ┻━┻
  • Loading branch information
Curve committed Oct 23, 2023
1 parent e370160 commit 611b773
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,21 @@ jobs:
id: cache-image
uses: actions/cache@v3
with:
path: venmic-builder.tar
key: venmic-builder-cache
path: |
venmic-builder-x86_64.tar
venmic-builder-arm64.tar
- name: 🏗️ Build Image
- name: 🏗️ Build x86_64 Image
if: steps.cache-image.outputs.cache-hit != 'true'
run: |
cd docker
docker buildx build --platform=linux/amd64,linux/arm64 --tag venmic-builder --load .
docker save > venmic-builder.tar
docker buildx build --platform=linux/amd64 --tag venmic-builder-x86_64 --load .
docker save venmic-builder-x86_64 > venmic-builder-x86_64.tar
docker buildx build --platform=linux/arm64 --tag venmic-builder-arm64 --load .
docker save venmic-builder-arm64 > venmic-builder-arm64.tar
build-x86_64:
needs: build-container
Expand All @@ -53,12 +59,13 @@ jobs:
id: cache-container
with:
fail-on-cache-miss: true
path: venmic-builder.tar
key: venmic-builder-cache
path: |
venmic-builder-x86_64.tar
- name: 🐋 Load Container
run: |
docker load < venmic-builder.tar
docker load < venmic-builder-x86_64.tar
- name: 🏗️ Build Addon
uses: addnab/docker-run-action@v3
Expand Down Expand Up @@ -89,8 +96,9 @@ jobs:
id: cache-container
with:
fail-on-cache-miss: true
path: venmic-builder.tar
key: venmic-builder-cache
path: |
venmic-builder-arm64.tar
- name: 🤖 Setup Qemu
uses: docker/setup-qemu-action@v3
Expand All @@ -99,7 +107,7 @@ jobs:

- name: 🐋 Load Container
run: |
docker load < venmic-builder.tar
docker load < venmic-builder-arm64.tar
- name: 🏗️ Build Addon
uses: addnab/docker-run-action@v3
Expand Down

0 comments on commit 611b773

Please sign in to comment.