1
0
forked from lxh/go-wxhelper

💚 优化Actions工作流配置,只打tag事件的镜像

This commit is contained in:
李寻欢 2023-10-25 10:02:59 +08:00
parent dc686a87e9
commit 581faf974c

View File

@ -2,8 +2,8 @@ name: BuildImage
on:
push:
branches:
- main
# branches:
# - main
tags:
- '*'
@ -32,7 +32,6 @@ jobs:
tags: |
type=ref,event=branch
type=ref,event=tag
type=sha
- name: Print Tags
run: |
@ -40,15 +39,16 @@ jobs:
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: ${{ steps.gen_tags.outputs.tags }}
labels: ${{ steps.gen_tags.outputs.labels }}