From 7c3aa79c5e088cc654d3164d0972facdcf8fd778 Mon Sep 17 00:00:00 2001 From: fewensa <37804932+fewensa@users.noreply.github.com> Date: Mon, 13 May 2024 12:12:21 +0800 Subject: [PATCH 1/2] Fix docker image build --- .github/workflows/publish.yml | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 5e56714..565b48d 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -32,7 +32,7 @@ jobs: - uses: olegtarasov/get-tag@v2.1 id: tag-name - - name: Build apollo + - name: Build apollo with sha uses: docker/build-push-action@v3 with: push: true @@ -40,16 +40,32 @@ jobs: file: apollo/Dockerfile tags: | ${{ env.DOCKER_REGISTRY }}/${{ github.repository }}/apollo:sha-${{ steps.short-sha.outputs.sha }} - ${{ env.DOCKER_REGISTRY }}/${{ github.repository }}/apollo:${{ steps.tag-name.outputs.tag }} - - name: Build ponder + - name: Build apollo with tag uses: docker/build-push-action@v3 + if: startsWith(github.ref, 'refs/tags/v') with: push: true context: . + file: apollo/Dockerfile + tags: | + ${{ env.DOCKER_REGISTRY }}/${{ github.repository }}/apollo:${{ steps.tag-name.outputs.tag }} + + - name: Build ponder with sha + uses: docker/build-push-action@v3 + with: + push: true file: ponder/lnv3/Dockerfile tags: | ${{ env.DOCKER_REGISTRY }}/${{ github.repository }}/ponder:sha-${{ steps.short-sha.outputs.sha }} + + - name: Build ponder with tag + uses: docker/build-push-action@v3 + if: startsWith(github.ref, 'refs/tags/v') + with: + push: true + file: ponder/lnv3/Dockerfile + tags: | ${{ env.DOCKER_REGISTRY }}/${{ github.repository }}/ponder:${{ steps.tag-name.outputs.tag }} From ad3e305537aa44075196141409f57d45b151be80 Mon Sep 17 00:00:00 2001 From: fewensa <37804932+fewensa@users.noreply.github.com> Date: Mon, 13 May 2024 14:19:59 +0800 Subject: [PATCH 2/2] Fix context --- .github/workflows/publish.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 565b48d..4590869 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -55,7 +55,7 @@ jobs: uses: docker/build-push-action@v3 with: push: true - file: ponder/lnv3/Dockerfile + context: ponder/lnv3 tags: | ${{ env.DOCKER_REGISTRY }}/${{ github.repository }}/ponder:sha-${{ steps.short-sha.outputs.sha }} @@ -64,7 +64,7 @@ jobs: if: startsWith(github.ref, 'refs/tags/v') with: push: true - file: ponder/lnv3/Dockerfile + context: ponder/lnv3 tags: | ${{ env.DOCKER_REGISTRY }}/${{ github.repository }}/ponder:${{ steps.tag-name.outputs.tag }}