From e876d805c622560c77d1dcf77f136720b555296b Mon Sep 17 00:00:00 2001 From: Daniel Savosin Date: Sun, 17 Mar 2024 11:35:13 +0700 Subject: [PATCH] move image push to buildx build command --- .github/workflows/continuous-integration.yml | 23 +++----------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index a3b4144..ed153bc 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -43,29 +43,12 @@ jobs: - name: Build the Docker images ${{ matrix.php_version }} run: | docker buildx build --cache-from=dannecron/php-for-dev:${{ matrix.php_version }} \ + --push \ --platform=linux/amd64,linux/arm64 \ --build-arg BUILDKIT_INLINE_CACHE=1 \ --build-arg COMPOSER_VERSION=${{ env.COMPOSER_VERSION }} \ - --tag=localhost/php-for-dev:${{ matrix.php_version }} \ + --tag=dannecron/php-for-dev:${{ matrix.php_version }} \ + $( (( "${{ matrix.php_version }}" -eq '8.0' )) && printf %s '--tag=dannecron/php-for-dev:latest') \ ./v${{ matrix.php_version }} - docker run --rm localhost/php-for-dev:${{ matrix.php_version }} php -v - docker tag localhost/php-for-dev:${{ matrix.php_version }} dannecron/php-for-dev:${{ matrix.php_version }} echo "Done" - - name: push ${{ matrix.php_version }} image to docker hub - if: success() - uses: actions-hub/docker@master - with: - args: push dannecron/php-for-dev:${{ matrix.php_version }} - - - name: tag latest image - if: success() && matrix.php_version == '8.0' - uses: actions-hub/docker@master - with: - args: tag dannecron/php-for-dev:${{ matrix.php_version }} dannecron/php-for-dev:latest - - - name: push latest image to docker hub - if: success() && matrix.php_version == '8.0' - uses: actions-hub/docker@master - with: - args: push dannecron/php-for-dev:latest