Skip to content

Commit 9ddfe67

Browse files
authored
汉化自动化配置
1 parent 358fb57 commit 9ddfe67

1 file changed

Lines changed: 18 additions & 6 deletions

File tree

.github/workflows/docker-image.yml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build and Push Docker Image to GHCR
1+
name: 构建并推送 Docker 镜像到 GHCR
22

33
on:
44
push:
@@ -18,20 +18,20 @@ jobs:
1818
packages: write
1919

2020
steps:
21-
- name: Checkout repository
21+
- name: 检出代码
2222
uses: actions/checkout@v4
2323

24-
- name: Set up Docker Buildx
24+
- name: 设置 Docker Buildx
2525
uses: docker/setup-buildx-action@v3
2626

27-
- name: Log in to GitHub Container Registry
27+
- name: 登录到 GitHub Container Registry
2828
uses: docker/login-action@v3
2929
with:
3030
registry: ${{ env.REGISTRY }}
3131
username: ${{ github.actor }}
3232
password: ${{ secrets.GITHUB_TOKEN }}
3333

34-
- name: Extract metadata (tags, labels) for Docker
34+
- name: 提取 Docker 镜像元数据(标签、元信息)
3535
id: meta
3636
uses: docker/metadata-action@v5
3737
with:
@@ -42,11 +42,23 @@ jobs:
4242
type=semver,pattern={{version}}
4343
type=sha
4444
45-
- name: Build and push Docker image
45+
- name: 构建并推送 Docker 镜像
46+
id: build
4647
uses: docker/build-push-action@v6
4748
with:
4849
context: .
4950
file: ./Dockerfile
5051
push: true
5152
tags: ${{ steps.meta.outputs.tags }}
5253
labels: ${{ steps.meta.outputs.labels }}
54+
outputs: type=registry
55+
56+
- name: 生成中文构建摘要
57+
run: |
58+
echo "Docker 镜像构建摘要:"
59+
echo "镜像名称: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}"
60+
echo "标签: ${{ steps.meta.outputs.tags }}"
61+
echo "构建时间: $(date '+%Y年%m月%d日 %H:%M:%S')"
62+
echo "构建状态: 成功"
63+
echo "仓库: ${{ github.repository }}"
64+
echo "提交 SHA: ${{ github.sha }}"

0 commit comments

Comments
 (0)