更新 .github/workflows/buidl_and_push_ghcr.yml
Some checks failed
Docker Image CI / build-and-push (push) Failing after 9s

This commit is contained in:
2025-12-18 06:23:02 +00:00
parent e1f30cfe60
commit 5823c083eb

View File

@@ -17,12 +17,13 @@ jobs:
with: with:
fetch-depth: 0 fetch-depth: 0
# 1. 提取变量步骤保持不变,这很有用
- name: Get Meta - name: Get Meta
id: meta id: meta
run: | run: |
# 【修改点】不要自动抓取,直接写死你的外部 HTTPS 域名 (不带 https://) # 【修改点】不要自动抓取,直接写死你的外部 HTTPS 域名 (不带 https://)
# 例如: git.example.com # 例如: git.example.com
REGISTRY_HOST="gitea.173114.xyz" REGISTRY_HOST="你的外部域名.com"
REPO_LOWER=$(echo "${{ gitea.repository }}" | tr '[:upper:]' '[:lower:]') REPO_LOWER=$(echo "${{ gitea.repository }}" | tr '[:upper:]' '[:lower:]')
SHA_SHORT=$(git rev-parse --short HEAD) SHA_SHORT=$(git rev-parse --short HEAD)
@@ -31,6 +32,9 @@ jobs:
echo "IMAGE_NAME=$REPO_LOWER" >> $GITHUB_OUTPUT echo "IMAGE_NAME=$REPO_LOWER" >> $GITHUB_OUTPUT
echo "VERSION_SHA=$SHA_SHORT" >> $GITHUB_OUTPUT echo "VERSION_SHA=$SHA_SHORT" >> $GITHUB_OUTPUT
# 打印一下,方便调试
echo "Will build: $REGISTRY_HOST/$REPO_LOWER:$SHA_SHORT"
# 2. 登录步骤 (Login Action 通常没问题,它只写配置文件) # 2. 登录步骤 (Login Action 通常没问题,它只写配置文件)
- name: Log in to Gitea Registry - name: Log in to Gitea Registry
uses: docker/login-action@v3 uses: docker/login-action@v3