From 34f254a4bef45df9835496327c3a0548b84e4c1c Mon Sep 17 00:00:00 2001 From: fewensa <37804932+fewensa@users.noreply.github.com> Date: Fri, 7 Jun 2024 14:07:43 +0800 Subject: [PATCH] Add latest and staging tag for docker image (#20) * Update ci * latest and staging tag --- .github/workflows/release.yml | 35 ++++++++++++++--------------------- 1 file changed, 14 insertions(+), 21 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6974f7f..3b9bcd2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,7 +33,9 @@ jobs: with: push: true context: ponder - tags: ${{ env.DOCKER_REGISTRY }}/${{ github.repository }}/ponder:sha-${{ env.SHA }} + tags: | + ${{ env.DOCKER_REGISTRY }}/${{ github.repository }}/ponder:sha-${{ env.SHA }} + ${{ env.DOCKER_REGISTRY }}/${{ github.repository }}/ponder:staging - name: Build ponder with tag uses: docker/build-push-action@v3 @@ -41,35 +43,26 @@ jobs: with: push: true context: ponder - tags: ${{ env.DOCKER_REGISTRY }}/${{ github.repository }}/ponder:${{ env.GIT_TAG_NAME }} - - - name: Build scanner with sha - uses: docker/build-push-action@v3 - with: - push: true - context: scanner - tags: ${{ env.DOCKER_REGISTRY }}/${{ github.repository }}/scanner:sha-${{ env.SHA }} - - - name: Build scanner with tag - uses: docker/build-push-action@v3 - if: startsWith(github.ref, 'refs/tags/v') - with: - push: true - context: scanner - tags: ${{ env.DOCKER_REGISTRY }}/${{ github.repository }}/scanner:${{ env.GIT_TAG_NAME }} + tags: | + ${{ env.DOCKER_REGISTRY }}/${{ github.repository }}/ponder:${{ env.GIT_TAG_NAME }} + ${{ env.DOCKER_REGISTRY }}/${{ github.repository }}/ponder:latest - name: Build server with sha uses: docker/build-push-action@v3 with: push: true - context: server - tags: ${{ env.DOCKER_REGISTRY }}/${{ github.repository }}/server:sha-${{ env.SHA }} + context: api + tags: | + ${{ env.DOCKER_REGISTRY }}/${{ github.repository }}/server:sha-${{ env.SHA } + ${{ env.DOCKER_REGISTRY }}/${{ github.repository }}/server:staging - name: Build server with tag uses: docker/build-push-action@v3 if: startsWith(github.ref, 'refs/tags/v') with: push: true - context: server - tags: ${{ env.DOCKER_REGISTRY }}/${{ github.repository }}/server:${{ env.GIT_TAG_NAME }} + context: api + tags: | + ${{ env.DOCKER_REGISTRY }}/${{ github.repository }}/server:${{ env.GIT_TAG_NAME } + ${{ env.DOCKER_REGISTRY }}/${{ github.repository }}/server:latest