Add additional tags on Docker images based on git ref (#5726) (#5728)

This commit is contained in:
Jan Mikeš 2021-03-02 14:59:33 +01:00 committed by GitHub
parent c6bf799da4
commit 85298cfff7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,7 +4,6 @@ on:
# Publish `master` as Docker `latest` image.
branches:
- master
- experimental-scoped
# Publish `v1.2.3` tags as releases.
tags:
@ -44,6 +43,16 @@ jobs:
--tag rector/rector:$VERSION-php${{ matrix.php-version }} \
--build-arg PHP_VERSION=${{ matrix.php-version }} .
- name: Extra tagging images
run: |
# For master build create php version tag etc: rector/rector:php8.0
[ "$VERSION" == "latest" ] && docker tag rector/rector:$VERSION-php${{ matrix.php-version }} rector/rector:php${{ matrix.php-version }}
# For php 8.0 create ref tag etc: rector/rector:0.9.31
[ "${{ matrix.php-version }}" == "8.0" ] && docker tag rector/rector:$VERSION-php${{ matrix.php-version }} rector/rector:$VERSION
docker push rector/rector -a
- name: Build Rector "secured"
if: matrix.php-version == '8.0'
run: |