From b141ce204590fd9a8ef64c6c8191e54d8cf97696 Mon Sep 17 00:00:00 2001 From: Fascinated Date: Sat, 8 Jul 2023 01:30:27 +0100 Subject: [PATCH 1/2] might work, might not - fix image tag --- .gitea/workflows/upload-image.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/upload-image.yaml b/.gitea/workflows/upload-image.yaml index a624fe8..2c62bdf 100644 --- a/.gitea/workflows/upload-image.yaml +++ b/.gitea/workflows/upload-image.yaml @@ -58,7 +58,12 @@ jobs: with: push: true context: . - tags: fascinated/sharex-php-uploader:${{ steps.branch-name.outputs.current_branch }} + tags: | + {{ if eq(steps.branch-name.outputs.current_branch, 'master') }} + fascinated/sharex-php-uploader:latest + {{ else }} + fascinated/sharex-php-uploader:${{ steps.branch-name.outputs.current_branch }} + {{ endif }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache -- 2.45.2 From 49727e46c90125805d63373fbcd65e0ce164f13f Mon Sep 17 00:00:00 2001 From: Fascinated Date: Sat, 8 Jul 2023 01:35:23 +0100 Subject: [PATCH 2/2] a dumb fix - might work --- .gitea/workflows/upload-image.yaml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/.gitea/workflows/upload-image.yaml b/.gitea/workflows/upload-image.yaml index 2c62bdf..f7da07b 100644 --- a/.gitea/workflows/upload-image.yaml +++ b/.gitea/workflows/upload-image.yaml @@ -53,17 +53,23 @@ jobs: path: /tmp/.buildx-cache key: ${{ runner.os }}-buildx - - name: Build and Push + - name: Build and Push (Latest) uses: docker/build-push-action@v4 + if: steps.branch-name.outputs.current_branch == 'master' with: push: true context: . - tags: | - {{ if eq(steps.branch-name.outputs.current_branch, 'master') }} - fascinated/sharex-php-uploader:latest - {{ else }} - fascinated/sharex-php-uploader:${{ steps.branch-name.outputs.current_branch }} - {{ endif }} + tags: fascinated/sharex-php-uploader:latest + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache + + - name: Build and Push (Other Branches) + uses: docker/build-push-action@v4 + if: steps.branch-name.outputs.current_branch != 'master' + with: + push: true + context: . + tags: fascinated/sharex-php-uploader:${{ steps.branch-name.outputs.current_branch }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache -- 2.45.2