1
0
Fork 0

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

This commit is contained in:
李寻欢 2023-10-25 10:02:59 +08:00
parent dc686a87e9
commit 581faf974c
1 changed files with 14 additions and 14 deletions

View File

@ -2,8 +2,8 @@ name: BuildImage
on: on:
push: push:
branches: # branches:
- main # - main
tags: tags:
- '*' - '*'
@ -32,7 +32,6 @@ jobs:
tags: | tags: |
type=ref,event=branch type=ref,event=branch
type=ref,event=tag type=ref,event=tag
type=sha
- name: Print Tags - name: Print Tags
run: | run: |
@ -40,15 +39,16 @@ jobs:
echo "----------------- labels -----------------" echo "----------------- labels -----------------"
echo "${{ steps.meta.outputs.labels }}" echo "${{ steps.meta.outputs.labels }}"
# - name: Login to Repository - name: Login to Repository
# uses: docker/login-action@v2 uses: docker/login-action@v2
# with: with:
# registry: gitee.ltd registry: gitee.ltd
# username: ${{ secrets.USERNAME }} username: ${{ secrets.USERNAME }}
# password: ${{ secrets.PASSWORD }} password: ${{ secrets.PASSWORD }}
# - name: Build image - name: Build image
# uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
# with: with:
# push: true push: true
# tags: ${{ fromJson(steps.gen_tags.outputs.tags) }} tags: ${{ steps.gen_tags.outputs.tags }}
labels: ${{ steps.gen_tags.outputs.labels }}