From 301e75cf0ca0faec2f1b34b37851f5b0b9df1023 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=AF=BB=E6=AC=A2?= Date: Wed, 25 Oct 2023 09:53:25 +0800 Subject: [PATCH] =?UTF-8?q?:green=5Fheart:=20=E4=BC=98=E5=8C=96Actions?= =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E6=B5=81=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/build-image.yaml | 40 ++++++++++++++++++------------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/.gitea/workflows/build-image.yaml b/.gitea/workflows/build-image.yaml index 8a247d6..62b68ea 100644 --- a/.gitea/workflows/build-image.yaml +++ b/.gitea/workflows/build-image.yaml @@ -26,23 +26,29 @@ jobs: - name: Gen Tags id: gen_tags + uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 + with: + images: gitee.ltd/lxh/go-wxhelper + tags: | + type=ref,event=branch + type=ref,event=tag + type=sha + + - name: Print Tags run: | - if [[ $GITHUB_REF == 'refs/tags/'* ]]; then - TAGS='["gitee.ltd/lxh/go-wxhelper:latest","gitee.ltd/lxh/go-wxhelper:'${GITHUB_REF/refs\/tags\//}'"]' - else - TAGS='["gitee.ltd/lxh/go-wxhelper:latest"]' - fi - echo '::set-output name=tags::'$TAGS + echo ${{ steps.gen_tags.outputs.tags }} + echo "----------------- labels -----------------" + echo ${{ steps.meta.outputs.labels }} - - name: Login to Repository - uses: docker/login-action@v2 - with: - registry: gitee.ltd - username: ${{ secrets.USERNAME }} - password: ${{ secrets.PASSWORD }} +# - name: Login to Repository +# uses: docker/login-action@v2 +# with: +# registry: gitee.ltd +# username: ${{ secrets.USERNAME }} +# password: ${{ secrets.PASSWORD }} - - name: Build image - uses: docker/build-push-action@v2 - with: - push: true - tags: ${{ fromJson(steps.gen_tags.outputs.tags) }} +# - name: Build image +# uses: docker/build-push-action@v2 +# with: +# push: true +# tags: ${{ fromJson(steps.gen_tags.outputs.tags) }}