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) }}