Build Docker image for Docker Hub in the GitHub Action

pull/253/head
Michele Locati 2021-01-14 16:40:50 +01:00
parent e30d4bd13b
commit 9a792f073b
No known key found for this signature in database
GPG Key ID: 98B7CE2E7234E28B
1 changed files with 14 additions and 0 deletions

View File

@ -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<<EOF\n%s\nEOF\n' "$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 != ''