diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 98f42a5..8808216 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,9 +7,9 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - version: [8.0, 8.1, 8.2] + php-version: [8.3, 8.4] steps: - uses: actions/checkout@v2 with: ref: ${{ github.event.release.target_commitish }} - - run: docker build . --build-arg PHP_VERSION=${{ matrix.version }} + - run: docker build . --build-arg PHP_VERSION=${{ matrix.php-version }} --build-arg ALPINE_VERSION=${{ vars.ALPINE_VERSION }} -t my-app:${{ matrix.php-version }} diff --git a/Dockerfile b/Dockerfile index a712992..e397b2d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,12 @@ ARG PHP_VERSION -FROM php:${PHP_VERSION}-alpine3.21 as standards-runtime +ARG ALPINE_VERSION + +FROM busybox:latest AS validator +ARG ALPINE_VERSION +RUN : "${ALPINE_VERSION:?ALPINE_VERSION build argument is required}" && touch /validated + +FROM php:${PHP_VERSION}-alpine${ALPINE_VERSION} AS standards-runtime +COPY --from=validator /validated /tmp/.validated # Install system dependencies RUN apk update && apk add --no-cache \