From 0f190a8454c8105e4cfc62c6a77786c750761028 Mon Sep 17 00:00:00 2001 From: Go Kudo Date: Wed, 27 Nov 2024 11:30:19 +0900 Subject: [PATCH] Fix Ubuntu deb package build (#27) * build: fix ubuntu deb build * MUST_REVERT: kick ci * build: fix arm64v8 -> arm64/v8 * build: fix * MUST_REVERT: ci kick * Revert "MUST_REVERT: ci kick" This reverts commit 0bbed6df75b69848add5e1fe374705144649743c. * Revert "MUST_REVERT: kick ci" This reverts commit 6978dd702f13fe12361f15bd5c8917e374fdb3c1. --- .github/workflows/build.yaml | 14 +++++++++----- build/ubuntu2204/Dockerfile | 4 ++-- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index afa704a..27ea4c5 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -9,7 +9,7 @@ jobs: timeout-minutes: 60 strategy: matrix: - arch: ["arm64v8", "amd64"] + platform: ["linux/arm64/v8", "linux/amd64"] steps: - name: Checkout uses: actions/checkout@v4 @@ -22,17 +22,21 @@ jobs: - name: Build Container uses: docker/build-push-action@v6 with: - build-args: ARCH=${{ matrix.arch }} + build-args: PLATFORM=${{ matrix.platform }} + cache-from: type=gha + cache-to: type=gha,mode=max context: . file: ./build/ubuntu2204/Dockerfile load: true - tags: "pskel-build-ubuntu2204-${{ matrix.arch }}" + tags: "pskel-build-ubuntu2204-${{ matrix.platform }}" - name: Build Extension with Container + id: build_container run: | + echo "arch=$(echo "${{ matrix.platform }}" | sed "s/^linux\///g" | sed "s/\//_/g")" >> $GITHUB_OUTPUT mkdir "artifacts" - docker run --env VERSION="${{ github.ref_name }}" --rm -v"$(pwd)/artifacts:/tmp/artifacts" -i "pskel-build-ubuntu2204-${{ matrix.arch }}" + docker run --env VERSION="${{ github.ref_name }}" --rm -v"$(pwd)/artifacts:/tmp/artifacts" -i "pskel-build-ubuntu2204-${{ matrix.platform }}" - name: Upload deb Packages uses: actions/upload-artifact@v4 with: - name: ubuntu_2204_debs-${{ matrix.arch }} + name: ubuntu_2204_debs_${{ steps.build_container.outputs.arch }} path: artifacts/ diff --git a/build/ubuntu2204/Dockerfile b/build/ubuntu2204/Dockerfile index 1fd8930..92436fc 100644 --- a/build/ubuntu2204/Dockerfile +++ b/build/ubuntu2204/Dockerfile @@ -1,6 +1,6 @@ -ARG ARCH=amd64 +ARG PLATFORM=linux/amd64 -FROM ${ARCH}/ubuntu:22.04 +FROM --platform=${PLATFORM} ubuntu:22.04 RUN apt-get update && \ DEBIAN_FRONTEND="noninteractive" apt-get install -y "php" "php-dev" "checkinstall"