From e1091f2f499325ffe525d6616306f1065bd8a95d Mon Sep 17 00:00:00 2001 From: DuodenumL Date: Wed, 9 Mar 2022 17:44:38 +0800 Subject: [PATCH] fix the issue of building debug image --- .github/workflows/dockerimage.yml | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/.github/workflows/dockerimage.yml b/.github/workflows/dockerimage.yml index 4c33817f7..d9ce3a610 100644 --- a/.github/workflows/dockerimage.yml +++ b/.github/workflows/dockerimage.yml @@ -34,11 +34,22 @@ jobs: uses: docker/metadata-action@v3 with: images: | - ${{ github.repository }} ghcr.io/${{ github.repository }} + ${{ github.repository }} tags: | type=ref,event=tag + - name: Docker meta for debug version + if: ${{ github.ref == 'refs/heads/master' }} + id: debug-meta + uses: docker/metadata-action@v3 + with: + images: | + ghcr.io/${{ github.repository }} + ${{ github.repository }} + tags: | + type=sha,format=long,prefix= + - name: Build and push image if: ${{ steps.meta.outputs.tags != '' }} uses: docker/build-push-action@v2 @@ -48,12 +59,11 @@ jobs: tags: ${{ steps.meta.outputs.tags }} - name: "[debug version] Build and push image" + if: ${{ github.ref == 'refs/heads/master' }} uses: docker/build-push-action@v2 with: context: "." push: true - build_args: | + build-args: | KEEP_SYMBOL=1 - tags: | - ${{ github.repository }}:${{ github.sha }}-debug - ghcr.io/${{ github.repository }}:${{ github.sha }}-debug + tags: ${{ steps.debug-meta.outputs.tags }}