ci: 删除 refs-heads

This commit is contained in:
Junyan Qin
2024-11-12 17:49:00 +08:00
parent 0d4784d098
commit 78005f8b4e
2 changed files with 2 additions and 45 deletions

View File

@@ -14,8 +14,8 @@ jobs:
id: generate_tag
run: |
# 获取分支名称,把/替换为-
echo ${{ github.ref }} | sed 's/\//-/g'
echo ::set-output name=tag::$(echo ${{ github.ref }} | sed 's/\//-/g')
echo ${{ github.ref }} | sed 's/refs\/heads\///g' | sed 's/\//-/g'
echo ::set-output name=tag::$(echo ${{ github.ref }} | sed 's/refs\/heads\///g' | sed 's/\//-/g')
- name: Login to Registry
run: docker login --username=${{ secrets.DOCKER_USERNAME }} --password ${{ secrets.DOCKER_PASSWORD }}
- name: Build Docker Image