Skip to content

Commit

Permalink
Fix Ubuntu deb package build (#27)
Browse files Browse the repository at this point in the history
* 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 0bbed6d.

* Revert "MUST_REVERT: kick ci"

This reverts commit 6978dd7.
  • Loading branch information
zeriyoshi authored Nov 27, 2024
1 parent acc98c9 commit 0f190a8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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/
4 changes: 2 additions & 2 deletions build/ubuntu2204/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"
Expand Down

0 comments on commit 0f190a8

Please sign in to comment.