💚 优化Actions工作流配置,只打tag事件的镜像
All checks were successful
BuildImage / build-image (push) Successful in 57s
All checks were successful
BuildImage / build-image (push) Successful in 57s
This commit is contained in:
parent
dc686a87e9
commit
581faf974c
@ -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 }}
|
||||
|
Loading…
Reference in New Issue
Block a user