diff --git a/.docker/build b/.docker/build index 7c0502a40..131b7745b 100755 --- a/.docker/build +++ b/.docker/build @@ -4,8 +4,8 @@ set -euf -o pipefail readonly SCRIPT_DIR=$(dirname $(realpath "${BASH_SOURCE:-$0}")) -if [[ "$(docker images -q box_php725 2> /dev/null)" == "" ]]; then - docker build --platform=linux/amd64 --tag=box_php725 --file "${SCRIPT_DIR}/php725" . +if [[ "$(docker images -q ghcr.io/box-project/box_php725 2> /dev/null)" == "" ]]; then + docker build --platform=linux/amd64 --tag=ghcr.io/box-project/box_php725 --file "${SCRIPT_DIR}/php725" . fi if [[ "$(docker images -q box_php81 2> /dev/null)" == "" ]]; then diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 0e6251bc8..979ed0be1 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -21,13 +21,13 @@ jobs: include: - name: PHP 7.2.5 docker-file: .docker/php725 - image-tag: box/php725 + image-tag: ghcr.io/box-project/box_php725 - name: PHP 8.1 docker-file: .docker/php81 - image-tag: box/php81 + image-tag: ghcr.io/box-project/box_php81 - name: PHP 8.1 (Xdebug) docker-file: .docker/php81_xdebug - image-tag: box/php81_xdebug + image-tag: ghcr.io/box-project/box_php81_xdebug steps: - name: Checkout uses: actions/checkout@v3 @@ -53,19 +53,20 @@ jobs: context: . file: ${{ matrix.docker-file }} platforms: linux/amd64 - tags: ghcr.io/${{ matrix.image-tag }} + tags: ${{ matrix.image-tag }} load: true - name: Test the image - run: docker run --rm ghcr.io/${{ matrix.image-tag }} php --version + run: docker run --rm ${{ matrix.image-tag }} php --version - name: Build and push + if: github.event_name != 'pull_request' uses: docker/build-push-action@v3 with: context: . file: ${{ matrix.docker-file }} platforms: linux/amd64 - tags: ghcr.io/${{ matrix.image-tag }} + tags: ${{ matrix.image-tag }} push: true cache-from: type=gha, scope=${{ github.workflow }} cache-to: type=gha, scope=${{ github.workflow }} diff --git a/requirement-checker/Makefile.e2e b/requirement-checker/Makefile.e2e index bea13b0a8..9fad7392d 100644 --- a/requirement-checker/Makefile.e2e +++ b/requirement-checker/Makefile.e2e @@ -10,7 +10,7 @@ DIFF = diff --strip-trailing-cr --ignore-all-space --side-by-side --suppress-com DOCKER_RUN = docker run --interactive --platform linux/amd64 --rm --workdir=/opt/box # Matches the minimum PHP version supported by Composer. -DOCKER_MIN_COMPOSER_PHP_VERSION_IMAGE_TAG = box_php725 +DOCKER_MIN_COMPOSER_PHP_VERSION_IMAGE_TAG = ghcr.io/box-project/box_php725 DOCKER_MIN_COMPOSER_PHP_VERSION_RUN_COMMAND = $(DOCKER_MIN_COMPOSER_PHP_VERSION_IMAGE_TAG) php index.phar -vvv --no-ansi # Matches the minimum PHP version supported by Box.