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