From 6e026f596aeb363e9b5bc99e6a1c06673a1d003d Mon Sep 17 00:00:00 2001 From: Eric Stern Date: Wed, 20 Jan 2021 11:12:01 -0800 Subject: [PATCH] Try using build arg for php version --- .github/workflows/alpine.dockerfile | 3 ++- .github/workflows/phpunit.yml | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/alpine.dockerfile b/.github/workflows/alpine.dockerfile index a5231f2..51626b5 100644 --- a/.github/workflows/alpine.dockerfile +++ b/.github/workflows/alpine.dockerfile @@ -1,2 +1,3 @@ -FROM php:8-cli-alpine +ARG PHP_VERSION +FROM php:{$PHP_VERSION}-cli-alpine COPY . . diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml index 2133b27..8f64635 100644 --- a/.github/workflows/phpunit.yml +++ b/.github/workflows/phpunit.yml @@ -63,8 +63,7 @@ jobs: - name: "Build Alpine image" if: ${{ matrix.operating-system == 'ubuntu-latest' }} - # todo: image per tag - run: docker build --file .github/workflows/alpine.dockerfile --tag testenv . + run: docker build --file .github/workflows/alpine.dockerfile --build-arg=${{ matrix.php-version }} --tag testenv . - name: "Test under Alpine" if: ${{ matrix.operating-system == 'ubuntu-latest' }}