fix(ci): GHCR 镜像名转为小写
This commit is contained in:
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@@ -168,7 +168,7 @@ jobs:
|
|||||||
VERSION=${TAG_NAME#v}
|
VERSION=${TAG_NAME#v}
|
||||||
REPO="${{ github.repository }}"
|
REPO="${{ github.repository }}"
|
||||||
DOCKER_IMAGE="${{ secrets.DOCKERHUB_USERNAME }}/sub2api"
|
DOCKER_IMAGE="${{ secrets.DOCKERHUB_USERNAME }}/sub2api"
|
||||||
GHCR_IMAGE="ghcr.io/${REPO}"
|
GHCR_IMAGE="ghcr.io/${REPO,,}" # ${,,} converts to lowercase
|
||||||
|
|
||||||
# 获取 tag message 内容
|
# 获取 tag message 内容
|
||||||
TAG_MESSAGE='${{ steps.tag_message.outputs.message }}'
|
TAG_MESSAGE='${{ steps.tag_message.outputs.message }}'
|
||||||
|
|||||||
@@ -78,12 +78,12 @@ dockers:
|
|||||||
- "--label=org.opencontainers.image.version={{ .Version }}"
|
- "--label=org.opencontainers.image.version={{ .Version }}"
|
||||||
- "--label=org.opencontainers.image.revision={{ .Commit }}"
|
- "--label=org.opencontainers.image.revision={{ .Commit }}"
|
||||||
|
|
||||||
# GHCR images
|
# GHCR images (owner must be lowercase)
|
||||||
- id: ghcr-amd64
|
- id: ghcr-amd64
|
||||||
goos: linux
|
goos: linux
|
||||||
goarch: amd64
|
goarch: amd64
|
||||||
image_templates:
|
image_templates:
|
||||||
- "ghcr.io/{{ .Env.GITHUB_REPO_OWNER }}/sub2api:{{ .Version }}-amd64"
|
- "ghcr.io/{{ lower .Env.GITHUB_REPO_OWNER }}/sub2api:{{ .Version }}-amd64"
|
||||||
dockerfile: Dockerfile.goreleaser
|
dockerfile: Dockerfile.goreleaser
|
||||||
use: buildx
|
use: buildx
|
||||||
build_flag_templates:
|
build_flag_templates:
|
||||||
@@ -96,7 +96,7 @@ dockers:
|
|||||||
goos: linux
|
goos: linux
|
||||||
goarch: arm64
|
goarch: arm64
|
||||||
image_templates:
|
image_templates:
|
||||||
- "ghcr.io/{{ .Env.GITHUB_REPO_OWNER }}/sub2api:{{ .Version }}-arm64"
|
- "ghcr.io/{{ lower .Env.GITHUB_REPO_OWNER }}/sub2api:{{ .Version }}-arm64"
|
||||||
dockerfile: Dockerfile.goreleaser
|
dockerfile: Dockerfile.goreleaser
|
||||||
use: buildx
|
use: buildx
|
||||||
build_flag_templates:
|
build_flag_templates:
|
||||||
@@ -127,26 +127,26 @@ docker_manifests:
|
|||||||
- "{{ .Env.DOCKERHUB_USERNAME }}/sub2api:{{ .Version }}-amd64"
|
- "{{ .Env.DOCKERHUB_USERNAME }}/sub2api:{{ .Version }}-amd64"
|
||||||
- "{{ .Env.DOCKERHUB_USERNAME }}/sub2api:{{ .Version }}-arm64"
|
- "{{ .Env.DOCKERHUB_USERNAME }}/sub2api:{{ .Version }}-arm64"
|
||||||
|
|
||||||
# GHCR manifests
|
# GHCR manifests (owner must be lowercase)
|
||||||
- name_template: "ghcr.io/{{ .Env.GITHUB_REPO_OWNER }}/sub2api:{{ .Version }}"
|
- name_template: "ghcr.io/{{ lower .Env.GITHUB_REPO_OWNER }}/sub2api:{{ .Version }}"
|
||||||
image_templates:
|
image_templates:
|
||||||
- "ghcr.io/{{ .Env.GITHUB_REPO_OWNER }}/sub2api:{{ .Version }}-amd64"
|
- "ghcr.io/{{ lower .Env.GITHUB_REPO_OWNER }}/sub2api:{{ .Version }}-amd64"
|
||||||
- "ghcr.io/{{ .Env.GITHUB_REPO_OWNER }}/sub2api:{{ .Version }}-arm64"
|
- "ghcr.io/{{ lower .Env.GITHUB_REPO_OWNER }}/sub2api:{{ .Version }}-arm64"
|
||||||
|
|
||||||
- name_template: "ghcr.io/{{ .Env.GITHUB_REPO_OWNER }}/sub2api:latest"
|
- name_template: "ghcr.io/{{ lower .Env.GITHUB_REPO_OWNER }}/sub2api:latest"
|
||||||
image_templates:
|
image_templates:
|
||||||
- "ghcr.io/{{ .Env.GITHUB_REPO_OWNER }}/sub2api:{{ .Version }}-amd64"
|
- "ghcr.io/{{ lower .Env.GITHUB_REPO_OWNER }}/sub2api:{{ .Version }}-amd64"
|
||||||
- "ghcr.io/{{ .Env.GITHUB_REPO_OWNER }}/sub2api:{{ .Version }}-arm64"
|
- "ghcr.io/{{ lower .Env.GITHUB_REPO_OWNER }}/sub2api:{{ .Version }}-arm64"
|
||||||
|
|
||||||
- name_template: "ghcr.io/{{ .Env.GITHUB_REPO_OWNER }}/sub2api:{{ .Major }}.{{ .Minor }}"
|
- name_template: "ghcr.io/{{ lower .Env.GITHUB_REPO_OWNER }}/sub2api:{{ .Major }}.{{ .Minor }}"
|
||||||
image_templates:
|
image_templates:
|
||||||
- "ghcr.io/{{ .Env.GITHUB_REPO_OWNER }}/sub2api:{{ .Version }}-amd64"
|
- "ghcr.io/{{ lower .Env.GITHUB_REPO_OWNER }}/sub2api:{{ .Version }}-amd64"
|
||||||
- "ghcr.io/{{ .Env.GITHUB_REPO_OWNER }}/sub2api:{{ .Version }}-arm64"
|
- "ghcr.io/{{ lower .Env.GITHUB_REPO_OWNER }}/sub2api:{{ .Version }}-arm64"
|
||||||
|
|
||||||
- name_template: "ghcr.io/{{ .Env.GITHUB_REPO_OWNER }}/sub2api:{{ .Major }}"
|
- name_template: "ghcr.io/{{ lower .Env.GITHUB_REPO_OWNER }}/sub2api:{{ .Major }}"
|
||||||
image_templates:
|
image_templates:
|
||||||
- "ghcr.io/{{ .Env.GITHUB_REPO_OWNER }}/sub2api:{{ .Version }}-amd64"
|
- "ghcr.io/{{ lower .Env.GITHUB_REPO_OWNER }}/sub2api:{{ .Version }}-amd64"
|
||||||
- "ghcr.io/{{ .Env.GITHUB_REPO_OWNER }}/sub2api:{{ .Version }}-arm64"
|
- "ghcr.io/{{ lower .Env.GITHUB_REPO_OWNER }}/sub2api:{{ .Version }}-arm64"
|
||||||
|
|
||||||
release:
|
release:
|
||||||
github:
|
github:
|
||||||
@@ -173,7 +173,7 @@ release:
|
|||||||
docker pull {{ .Env.DOCKERHUB_USERNAME }}/sub2api:{{ .Version }}
|
docker pull {{ .Env.DOCKERHUB_USERNAME }}/sub2api:{{ .Version }}
|
||||||
|
|
||||||
# GitHub Container Registry
|
# GitHub Container Registry
|
||||||
docker pull ghcr.io/{{ .Env.GITHUB_REPO_OWNER }}/sub2api:{{ .Version }}
|
docker pull ghcr.io/{{ lower .Env.GITHUB_REPO_OWNER }}/sub2api:{{ .Version }}
|
||||||
```
|
```
|
||||||
|
|
||||||
**One-line install (Linux):**
|
**One-line install (Linux):**
|
||||||
|
|||||||
Reference in New Issue
Block a user