mirror of
https://github.com/Dannecron/php-for-dev.git
synced 2025-12-25 16:12:35 +03:00
move image push to buildx build command
This commit is contained in:
23
.github/workflows/continuous-integration.yml
vendored
23
.github/workflows/continuous-integration.yml
vendored
@@ -43,29 +43,12 @@ jobs:
|
|||||||
- name: Build the Docker images ${{ matrix.php_version }}
|
- name: Build the Docker images ${{ matrix.php_version }}
|
||||||
run: |
|
run: |
|
||||||
docker buildx build --cache-from=dannecron/php-for-dev:${{ matrix.php_version }} \
|
docker buildx build --cache-from=dannecron/php-for-dev:${{ matrix.php_version }} \
|
||||||
|
--push \
|
||||||
--platform=linux/amd64,linux/arm64 \
|
--platform=linux/amd64,linux/arm64 \
|
||||||
--build-arg BUILDKIT_INLINE_CACHE=1 \
|
--build-arg BUILDKIT_INLINE_CACHE=1 \
|
||||||
--build-arg COMPOSER_VERSION=${{ env.COMPOSER_VERSION }} \
|
--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 }}
|
./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"
|
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
|
|
||||||
|
|||||||
Reference in New Issue
Block a user