Skip to content

Commit 59fc795

Browse files
committed
ci(docker-publish): 优化 Docker 镜像构建工作流
移除冗余的环境变量定义,合并仓库名转小写步骤,简化工作流配置
1 parent 4d9f346 commit 59fc795

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

.github/workflows/docker-publish.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,17 @@ on:
77

88
jobs:
99
build-and-push:
10-
name: 构建并推送Docker镜像
10+
name: 构建并推送 Docker 镜像
1111
runs-on: ubuntu-latest
1212
permissions:
1313
contents: read
1414
packages: write
1515

16-
env:
17-
REPOSITORY_LOWER: ${{ github.repository }}
18-
1916
steps:
2017
- name: 检出代码
2118
uses: actions/checkout@v4
2219

23-
- name: 将仓库名转为小写
24-
id: lowercase
20+
- name: 将仓库名转为小写,设置环境变量
2521
run: echo "REPOSITORY_LOWER=$(echo '${{ github.repository }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
2622

2723
- name: 设置 Docker Buildx

0 commit comments

Comments
 (0)