diff --git a/.github/workflows/release-extension.yml b/.github/workflows/release-extension.yml index 8884817..01132d5 100644 --- a/.github/workflows/release-extension.yml +++ b/.github/workflows/release-extension.yml @@ -42,6 +42,7 @@ jobs: run: | IMAGE=${{ env.REGISTRY }}/${{ github.repository }}-extension:${{ github.ref_name }} cd extension + docker build --no-cache --build-arg=PHP_VERSION=8.5 -t ${IMAGE}-php8.5-${{ matrix.arch }} . docker build --no-cache --build-arg=PHP_VERSION=8.4 -t ${IMAGE}-php8.4-${{ matrix.arch }} . docker build --no-cache --build-arg=PHP_VERSION=8.3 -t ${IMAGE}-php8.3-${{ matrix.arch }} . docker build --no-cache --build-arg=PHP_VERSION=8.2 -t ${IMAGE}-php8.2-${{ matrix.arch }} . @@ -49,10 +50,10 @@ jobs: - name: ☁️ Push run: | IMAGE=${{ env.REGISTRY }}/${{ github.repository }}-extension:${{ github.ref_name }} + docker push ${IMAGE}-php8.5-${{matrix.arch}} docker push ${IMAGE}-php8.4-${{matrix.arch}} docker push ${IMAGE}-php8.3-${{matrix.arch}} docker push ${IMAGE}-php8.2-${{matrix.arch}} - manifest: name: Manifest runs-on: ubuntu-latest @@ -75,6 +76,8 @@ jobs: - name: ☁️ Push run: | IMAGE=${{ env.REGISTRY }}/${{ github.repository }}-extension:${{ github.ref_name }} + docker manifest create ${IMAGE}-php8.5 --amend ${IMAGE}-php8.5-arm64 --amend ${IMAGE}-php8.5-amd64 + docker manifest push ${IMAGE}-php8.5 docker manifest create ${IMAGE}-php8.4 --amend ${IMAGE}-php8.4-arm64 --amend ${IMAGE}-php8.4-amd64 docker manifest push ${IMAGE}-php8.4 docker manifest create ${IMAGE}-php8.3 --amend ${IMAGE}-php8.3-arm64 --amend ${IMAGE}-php8.3-amd64 diff --git a/extension/.devcontainer/Dockerfile b/extension/.devcontainer/Dockerfile index 12a86ab..04cc054 100644 --- a/extension/.devcontainer/Dockerfile +++ b/extension/.devcontainer/Dockerfile @@ -1,11 +1,16 @@ -FROM ghcr.io/skpr/php-cli:8.4-v2-stable +FROM alpine:3.21 USER root +RUN apk add --no-cache curl && \ + curl -sSL https://packages.skpr.io/php-alpine/skpr.rsa.pub -o /etc/apk/keys/skpr.rsa.pub && \ + echo "https://packages.skpr.io/php-alpine/3.21/php8.4" >> /etc/apk/repositories + RUN apk add alpine-sdk \ clang \ clang-dev \ git \ + php8.4 \ php8.4-dev ENV MISE_DATA_DIR="/mise" @@ -19,3 +24,6 @@ RUN curl https://mise.run | sh ENV RUSTFLAGS="-C target-feature=-crt-static" ENV RUST_BACKTRACE=full + +WORKDIR /data + diff --git a/extension/Dockerfile b/extension/Dockerfile index 15a1801..7c1b106 100644 --- a/extension/Dockerfile +++ b/extension/Dockerfile @@ -1,11 +1,14 @@ ARG PHP_VERSION=8.3 -FROM ghcr.io/skpr/php-cli:${PHP_VERSION}-v2-stable AS build - +FROM alpine:3.21 AS build ARG PHP_VERSION=8.3 USER root -RUN apk add alpine-sdk clang clang-dev php${PHP_VERSION}-dev +RUN apk add --no-cache curl && \ + curl -sSL https://packages.skpr.io/php-alpine/skpr.rsa.pub -o /etc/apk/keys/skpr.rsa.pub && \ + echo "https://packages.skpr.io/php-alpine/3.21/php${PHP_VERSION}" >> /etc/apk/repositories + +RUN apk add alpine-sdk clang clang-dev php${PHP_VERSION} php${PHP_VERSION}-dev ENV MISE_DATA_DIR="/mise" ENV MISE_CONFIG_DIR="/mise" @@ -18,6 +21,8 @@ RUN curl https://mise.run | sh ENV RUSTFLAGS="-C target-feature=-crt-static" ENV RUST_BACKTRACE=full +WORKDIR /data + ADD --chown=skpr:skpr . /data RUN mise trust . @@ -25,7 +30,7 @@ RUN mise run lint RUN mise run build RUN mise run validate -FROM ghcr.io/skpr/php-cli:${PHP_VERSION}-v2-stable +FROM scratch COPY compass.ini /etc/php/conf.d/00_compass.ini COPY --from=build /data/target/release/libcompass_extension.so /usr/lib/php/modules/compass.so