From 9a792f073baa345b878e9af2edf67a68e7479437 Mon Sep 17 00:00:00 2001 From: Michele Locati Date: Thu, 14 Jan 2021 16:40:50 +0100 Subject: [PATCH] Build Docker image for Docker Hub in the GitHub Action --- .github/workflows/readme-release.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/readme-release.yml b/.github/workflows/readme-release.yml index 2ec8b47..b930e3b 100644 --- a/.github/workflows/readme-release.yml +++ b/.github/workflows/readme-release.yml @@ -148,6 +148,20 @@ jobs: printf 'Release notes:\n%s\n' "$RELEASE_NOTES" printf 'RELEASE_NAME=v%s\n' "$VERSIONTAG_THIS" >> "$GITHUB_ENV" printf 'RELEASE_NOTES<> "$GITHUB_ENV" + - name: Login to Docker Hub + if: env.VERSIONTAG_THIS != '' + uses: docker/login-action@v1 + with: + username: mlocati + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Build docker image and push to Docker Hub + uses: docker/build-push-action@v2 + if: env.VERSIONTAG_THIS != '' + with: + push: true + tags: | + mlocati/php-extension-installer:${{ env.VERSIONTAG_THIS }} + mlocati/php-extension-installer:latest - name: Create release id: create_release if: env.VERSIONTAG_THIS != ''