From 0dad73da5d11a2d7a60dc2fece52b75a443cb42d Mon Sep 17 00:00:00 2001 From: GilbN Date: Wed, 23 Mar 2022 21:46:48 +0100 Subject: [PATCH 1/2] more workflow_dispatch fixes --- .github/workflows/docker-build.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 737fb603..7be932cb 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -12,6 +12,8 @@ on: options: - master - develop + tag: + description: 'Add a tag' push: branches: - develop @@ -38,10 +40,14 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.GH_PAT }} - name: build&push master - if: ${{ github.event.release.target_commitish == 'master' || github.event.inputs.branch == 'master' }} + if: ${{ github.event.release.target_commitish == 'master' }} run: | docker build --build-arg TP_RELEASE=${{ steps.get_version.outputs.VERSION }} --build-arg BUILD_DATE=${{ steps.date_time.outputs.NOW }} --tag ghcr.io/gilbn/theme.park --tag ghcr.io/gilbn/theme.park:${{ steps.get_version.outputs.VERSION }} . docker push --all-tags ghcr.io/gilbn/theme.park + if: ${{ github.event.inputs.branch == 'master' }} + run: | + docker build --build-arg TP_RELEASE=${{ github.event.inputs.tag }} --build-arg BUILD_DATE=${{ steps.date_time.outputs.NOW }} --tag ghcr.io/gilbn/theme.park --tag ghcr.io/gilbn/theme.park:${{ github.event.inputs.tag }} . + docker push --all-tags ghcr.io/gilbn/theme.park - name: build&push develop if: ${{ github.ref == 'refs/heads/develop' || github.event.inputs.branch == 'develop' }} run: | @@ -66,10 +72,14 @@ jobs: username: ${{ secrets.DH_USER }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: build&push dh master - if: ${{ github.event.release.target_commitish == 'master' || github.event.inputs.branch == 'master' }} + if: ${{ github.event.release.target_commitish == 'master' }} run: | docker build --build-arg TP_RELEASE=${{ steps.get_version.outputs.VERSION }} --build-arg BUILD_DATE=${{ steps.date_time.outputs.NOW }} --tag gilbn/theme.park --tag gilbn/theme.park:${{ steps.get_version.outputs.VERSION }} . docker push --all-tags gilbn/theme.park + if: ${{ github.event.inputs.branch == 'master' }} + run: | + docker build --build-arg TP_RELEASE=${{ github.event.inputs.tag }} --build-arg BUILD_DATE=${{ steps.date_time.outputs.NOW }} --tag ghcr.io/gilbn/theme.park --tag ghcr.io/gilbn/theme.park:${{ github.event.inputs.tag }} . + docker push --all-tags ghcr.io/gilbn/theme.park - name: build&push dh develop if: ${{ github.ref == 'refs/heads/develop' || github.event.inputs.branch == 'develop' }} run: | From afe5706fc6609aef99414f2cc4ceb584e8fca49a Mon Sep 17 00:00:00 2001 From: GilbN Date: Wed, 23 Mar 2022 21:48:36 +0100 Subject: [PATCH 2/2] repo fix --- .github/workflows/docker-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 7be932cb..ddcb2cc7 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -78,8 +78,8 @@ jobs: docker push --all-tags gilbn/theme.park if: ${{ github.event.inputs.branch == 'master' }} run: | - docker build --build-arg TP_RELEASE=${{ github.event.inputs.tag }} --build-arg BUILD_DATE=${{ steps.date_time.outputs.NOW }} --tag ghcr.io/gilbn/theme.park --tag ghcr.io/gilbn/theme.park:${{ github.event.inputs.tag }} . - docker push --all-tags ghcr.io/gilbn/theme.park + docker build --build-arg TP_RELEASE=${{ github.event.inputs.tag }} --build-arg BUILD_DATE=${{ steps.date_time.outputs.NOW }} --tag gilbn/theme.park --tag gilbn/theme.park:${{ github.event.inputs.tag }} . + docker push --all-tags gilbn/theme.park - name: build&push dh develop if: ${{ github.ref == 'refs/heads/develop' || github.event.inputs.branch == 'develop' }} run: |