WebSocket 把 proxy_http_version 1.1 + Upgrade/Connection 移进 location / 内部
CI / verify (push) Canceled after 0s

This commit is contained in:
2026-10-17 11:58:43 +08:00
parent c1bcdd0b86
commit 6b8ff0e5a3
6 changed files with 35 additions and 12 deletions
+11 -4
View File
@@ -4,14 +4,21 @@ Manual OCI layout pusher for registries whose token realm is misconfigured.
This script is an emergency fallback. It reads Docker's OCI layout output,
obtains a Bearer token over HTTPS from the Git credential store, and uploads
the blobs and image manifest directly through the Registry HTTP API.
默认面向 GitHub Container Registry(ghcr.io)。如果要用回自建 Gitea registry:
-Registry jayhub.top -Repository mrlee/havline -CredentialHost jayhub.top `
-TokenPath /v2/token -TokenService container_registry
#>
param(
[Parameter(Mandatory = $true)][string]$LayoutDir,
[Parameter(Mandatory = $true)][string]$Platform,
[Parameter(Mandatory = $true)][string]$Tag,
[string]$Registry = "jayhub.top",
[string]$Repository = "mrlee/havline",
[string]$CredentialHost = "jayhub.top"
[string]$Registry = "ghcr.io",
[string]$Repository = "mrlee233/havline",
[string]$CredentialHost = "ghcr.io",
# GHCR: /token?service=ghcr.io;Gitea: /v2/token?service=container_registry
[string]$TokenPath = "/token",
[string]$TokenService = "ghcr.io"
)
$ErrorActionPreference = "Stop"
@@ -33,7 +40,7 @@ function Get-RegistryBasicAuth {
function Get-BearerToken([string]$Scope) {
$basic = Get-RegistryBasicAuth
$url = "https://$Registry/v2/token?service=container_registry&scope=$Scope"
$url = "https://$Registry$TokenPath?service=$TokenService&scope=$Scope"
$response = Invoke-RestMethod -Uri $url -Headers @{ Authorization = $basic }
if (-not $response.token) { throw "Registry did not return a token" }
return $response.token
+2 -2
View File
@@ -5,7 +5,7 @@
#
# 可选环境变量:
# COMPOSE_FILE=docker-compose.hub.yml # 要用的编排文件
# REPO=http://.../mrlee/Havline.git # 源码仓库
# REPO=https://github.com/mrlee233/havline.git # 源码仓库
# BRANCH=main # 分支
#
# 它做四件事:
@@ -16,7 +16,7 @@
# 4) 打印「回滚到上一个 tag」的命令
set -euo pipefail
REPO="${REPO:-https://jayhub.top/mrlee/Havline.git}"
REPO="${REPO:-https://github.com/mrlee233/havline.git}"
BRANCH="${BRANCH:-main}"
COMPOSE_FILE="${COMPOSE_FILE:-docker-compose.hub.yml}"
APP_CONTAINER="${APP_CONTAINER:-havline}"