From fb7c789e6e40aec990457a0ff9a0c2306e501827 Mon Sep 17 00:00:00 2001 From: binhex Date: Mon, 22 Feb 2021 22:24:05 +0000 Subject: [PATCH] reintroduce dynamics, and push --- .../workflows/docker-tag-triggered-prod.yml | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/.github/workflows/docker-tag-triggered-prod.yml b/.github/workflows/docker-tag-triggered-prod.yml index fd0f1f8..f1b2a34 100644 --- a/.github/workflows/docker-tag-triggered-prod.yml +++ b/.github/workflows/docker-tag-triggered-prod.yml @@ -1,11 +1,9 @@ name: docker-tag-triggered-prod on: - workflow_dispatch: - inputs: - tags: - description: 'Enter tag name for test/dev image' - default: 'test' + push: + tags: + - '*' jobs: gcr-dockerhub-build-publish: @@ -51,5 +49,17 @@ jobs: run: | docker build \ --tag ${{ github.repository }}:latest \ + --tag ${{ github.repository }}:${{ steps.identify_tag.outputs.tag }} \ --tag ghcr.io/${{ github.repository }}:latest \ - . \ No newline at end of file + --tag ghcr.io/${{ github.repository }}:${{ steps.identify_tag.outputs.tag }} \ + . + - name: Push Docker image to Docker Hub + run: | + docker push \ + ${{ github.repository }}:latest \ + ${{ github.repository }}:${{ steps.identify_tag.outputs.tag }} + - name: Push Docker image to GitHub Container Registry (GHCR) + run: | + docker push \ + ghcr.io/${{ github.repository }}:latest \ + ghcr.io/${{ github.repository }}:${{ steps.identify_tag.outputs.tag }} \ No newline at end of file