Skip to content

Commit 81991ca

Browse files
ci: publish docker images to Docker Hub only
Drop GHCR for all first-party images and publish exclusively to Docker Hub: - CLI release image -> docker.io/qualcomm/geniex (remove GHCR login + push steps in _build-docker.yml; drop the GHCR ref in release.yml and the OCI repo_tags in cli/release/linux/BUILD.bazel) - Toolchain images -> docker.io/qualcomm/geniex-toolchain-{linux,android} (_build-toolchain-docker.yml logs in to Docker Hub; _build-sdk.yml pulls the toolchain containers from Docker Hub), pinned at v0.0.1 - DockerHub login uses the DOCKERHUB_USERNAME / DOCKERHUB_TOKEN secrets - Docs (notes/build.md, sdk/benchmark/README.md, scripts/README.md, HANDOFF-android-aar.md, docs/*/run/linux/install.mdx, docs/*/resources/troubleshooting.mdx) point at Docker Hub; the upstream ghcr.io/snapdragon-toolchain base images are unchanged
1 parent 5f824a7 commit 81991ca

13 files changed

Lines changed: 92 additions & 79 deletions

File tree

.github/workflows/_build-docker.yml

Lines changed: 26 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,10 @@ on:
1313
type: string
1414
default: ""
1515
push:
16-
description: "Push the image to ghcr.io (release-time only)"
16+
description: "Push the image to the registries (release-time only)"
1717
required: false
1818
type: boolean
1919
default: false
20-
image:
21-
description: "Fully-qualified image reference without tag (release-only)."
22-
required: false
23-
type: string
24-
default: ghcr.io/qualcomm/geniex-cli
2520
tag:
2621
description: "Image tag to publish, e.g. v1.2.3 (required when push=true)."
2722
required: false
@@ -95,17 +90,16 @@ jobs:
9590
echo "${HOME}/.local/bin" >> "$GITHUB_PATH"
9691
"${HOME}/.local/bin/crane" version
9792
98-
- name: Determine image ref
93+
- name: Determine image refs
9994
shell: bash
10095
env:
10196
RAW_VERSION: ${{ steps.version.outputs.version }}
102-
IMAGE: ${{ inputs.image }}
10397
TAG: ${{ inputs.tag }}
10498
run: |
10599
set -euo pipefail
106100
bare="${RAW_VERSION#v}"
107101
dest_tag="${TAG:-$bare}"
108-
echo "IMAGE_REF=${IMAGE}:${dest_tag}" >> "$GITHUB_ENV"
102+
echo "DOCKERHUB_REF=docker.io/qualcomm/geniex:${dest_tag}" >> "$GITHUB_ENV"
109103
110104
- name: Validate tarball (PR path)
111105
if: ${{ !inputs.push }}
@@ -117,29 +111,26 @@ jobs:
117111
file "${tarball}"
118112
tar -tf "${tarball}" | head -10
119113
120-
# # Enterprise policy blocks GITHUB_TOKEN from creating org packages,
121-
# # so login with GH_PAT (user-scoped, SAML-authorized).
122-
# - name: Log in to GHCR (crane)
123-
# if: inputs.push
124-
# shell: bash
125-
# env:
126-
# GHCR_USER: ${{ github.actor }}
127-
# GHCR_TOKEN: ${{ secrets.GH_PAT }}
128-
# run: |
129-
# set -euo pipefail
130-
# echo "${GHCR_TOKEN}" | crane auth login ghcr.io -u "${GHCR_USER}" --password-stdin
131-
#
132-
# - name: Push image to GHCR
133-
# if: inputs.push
134-
# shell: bash
135-
# env:
136-
# IMAGE: ${{ inputs.image }}
137-
# IMAGE_REF: ${{ env.IMAGE_REF }}
138-
# IS_PRERELEASE: ${{ inputs.is_prerelease }}
139-
# run: |
140-
# set -euo pipefail
141-
# crane push bazel-bin/cli/release/linux/geniex-cli-docker.tar "${IMAGE_REF}"
142-
# # Prereleases must not clobber the floating :latest tag.
143-
# if [[ "${IS_PRERELEASE}" != "true" ]]; then
144-
# crane tag "${IMAGE_REF}" latest
145-
# fi
114+
- name: Log in to DockerHub (crane)
115+
if: inputs.push
116+
shell: bash
117+
env:
118+
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USERNAME }}
119+
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
120+
run: |
121+
set -euo pipefail
122+
echo "${DOCKERHUB_TOKEN}" | crane auth login docker.io -u "${DOCKERHUB_USER}" --password-stdin
123+
124+
- name: Push image to DockerHub
125+
if: inputs.push
126+
shell: bash
127+
env:
128+
IMAGE_REF: ${{ env.DOCKERHUB_REF }}
129+
IS_PRERELEASE: ${{ inputs.is_prerelease }}
130+
run: |
131+
set -euo pipefail
132+
crane push bazel-bin/cli/release/linux/geniex-cli-docker.tar "${IMAGE_REF}"
133+
# Prereleases must not clobber the floating :latest tag.
134+
if [[ "${IS_PRERELEASE}" != "true" ]]; then
135+
crane tag "${IMAGE_REF}" latest
136+
fi

.github/workflows/_build-sdk.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ jobs:
4040
- platform: linux-arm64
4141
runner: ubuntu-latest
4242
preset: arm64-linux-snapdragon-release
43-
container_image: ghcr.io/qualcomm/geniex-toolchain-linux:v0.0.2
43+
container_image: docker.io/qualcomm/geniex-toolchain-linux:v0.0.1
4444
- platform: android-arm64
4545
runner: ubuntu-latest
4646
preset: arm64-android-snapdragon-release
47-
container_image: ghcr.io/qualcomm/geniex-toolchain-android:v0.0.1
47+
container_image: docker.io/qualcomm/geniex-toolchain-android:v0.0.1
4848
runs-on: ${{ matrix.runner }}
4949
timeout-minutes: 120
5050

.github/workflows/_build-toolchain-docker.yml

Lines changed: 49 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ name: Build Toolchain Docker
1212
# tag equals the git tag minus the `toolchain-` prefix.
1313
#
1414
# Image names:
15-
# ghcr.io/qualcomm/geniex-toolchain-linux:<version>
16-
# ghcr.io/qualcomm/geniex-toolchain-android:<version>
15+
# docker.io/qualcomm/geniex-toolchain-linux:<version>
16+
# docker.io/qualcomm/geniex-toolchain-android:<version>
1717
#
1818
# We intentionally do NOT publish a :latest tag - _build-sdk.yml pins an
1919
# exact semantic version so upstream changes cannot silently affect SDK
@@ -41,7 +41,6 @@ on:
4141

4242
permissions:
4343
contents: read
44-
packages: write
4544

4645
jobs:
4746
build:
@@ -54,10 +53,10 @@ jobs:
5453
include:
5554
- platform: linux
5655
dockerfile: .github/docker/toolchain-linux.Dockerfile
57-
image: ghcr.io/qualcomm/geniex-toolchain-linux
56+
image: docker.io/qualcomm/geniex-toolchain-linux
5857
- platform: android
5958
dockerfile: .github/docker/toolchain-android.Dockerfile
60-
image: ghcr.io/qualcomm/geniex-toolchain-android
59+
image: docker.io/qualcomm/geniex-toolchain-android
6160

6261
steps:
6362
- name: Checkout source
@@ -105,17 +104,22 @@ jobs:
105104
steps.meta.outputs.platforms == matrix.platform
106105
uses: docker/setup-buildx-action@v3
107106

108-
- name: Log in to GHCR
107+
- name: Log in to DockerHub
109108
if: >-
110109
steps.meta.outputs.platforms == 'both' ||
111110
steps.meta.outputs.platforms == matrix.platform
112111
uses: docker/login-action@v4
113112
with:
114-
registry: ghcr.io
115-
username: ${{ github.actor }}
116-
password: ${{ secrets.GH_PAT }}
113+
registry: docker.io
114+
username: ${{ secrets.DOCKERHUB_USERNAME }}
115+
password: ${{ secrets.DOCKERHUB_TOKEN }}
117116

118-
- name: Build and push
117+
# buildx pushing straight to Docker Hub fails the final blob PUT with
118+
# an HTML "400 Bad request"; build to a tarball and push it with crane
119+
# instead (same pattern as _build-docker.yml). Use type=docker, not
120+
# type=oci: crane's tarball loader needs the manifest.json that only
121+
# the docker-archive layout carries.
122+
- name: Build image tarball
119123
if: >-
120124
steps.meta.outputs.platforms == 'both' ||
121125
steps.meta.outputs.platforms == matrix.platform
@@ -124,10 +128,41 @@ jobs:
124128
context: .
125129
file: ${{ matrix.dockerfile }}
126130
platforms: linux/amd64
127-
push: true
131+
push: false
128132
provenance: false
129-
tags: |
130-
${{ matrix.image }}:${{ steps.meta.outputs.version }}
131-
${{ matrix.image }}:sha-${{ github.sha }}
133+
outputs: type=docker,dest=${{ runner.temp }}/toolchain-${{ matrix.platform }}.tar
132134
cache-from: type=gha,scope=toolchain-${{ matrix.platform }}
133135
cache-to: type=gha,scope=toolchain-${{ matrix.platform }},mode=max
136+
137+
- name: Install crane (for tarball → registry push)
138+
if: >-
139+
steps.meta.outputs.platforms == 'both' ||
140+
steps.meta.outputs.platforms == matrix.platform
141+
shell: bash
142+
run: |
143+
set -euo pipefail
144+
if command -v crane >/dev/null 2>&1; then
145+
crane version
146+
exit 0
147+
fi
148+
version="v0.20.3"
149+
tmp="$(mktemp -d)"
150+
curl -fsSL -o "${tmp}/crane.tgz" \
151+
"https://github.com/google/go-containerregistry/releases/download/${version}/go-containerregistry_Linux_x86_64.tar.gz"
152+
mkdir -p "${HOME}/.local/bin"
153+
tar -xzf "${tmp}/crane.tgz" -C "${HOME}/.local/bin" crane
154+
echo "${HOME}/.local/bin" >> "$GITHUB_PATH"
155+
"${HOME}/.local/bin/crane" version
156+
157+
- name: Push image with crane
158+
if: >-
159+
steps.meta.outputs.platforms == 'both' ||
160+
steps.meta.outputs.platforms == matrix.platform
161+
shell: bash
162+
env:
163+
TARBALL: ${{ runner.temp }}/toolchain-${{ matrix.platform }}.tar
164+
IMAGE: ${{ matrix.image }}
165+
VERSION: ${{ steps.meta.outputs.version }}
166+
run: |
167+
set -euo pipefail
168+
crane push "${TARBALL}" "${IMAGE}:${VERSION}"

.github/workflows/release.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,6 @@ jobs:
573573
with:
574574
version_tag: ${{ needs.resolve-tag.outputs.tag }}
575575
push: true
576-
image: ghcr.io/qualcomm/geniex-cli
577576
tag: ${{ needs.resolve-tag.outputs.tag }}
578577
is_prerelease: ${{ needs.resolve-tag.outputs.is_prerelease == 'true' }}
579578

HANDOFF-android-aar.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ docker run --rm -u $(id -u):$(id -g) \
6161
--workdir /workspace/sdk \
6262
-e CCACHE_DIR=/workspace/.ccache \
6363
--platform linux/amd64 \
64-
ghcr.io/qualcomm/geniex-toolchain-android:v0.0.1 \
64+
docker.io/qualcomm/geniex-toolchain-android:v0.0.1 \
6565
bash -c 'cmake --preset arm64-android-snapdragon-debug -B build-android . \
6666
&& cmake --build build-android -j \
6767
&& cmake --install build-android --prefix pkg-geniex'

cli/release/linux/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ oci_image(
8989
genrule(
9090
name = "_repo_tags",
9191
outs = ["repo_tags.txt"],
92-
cmd = "echo ghcr.io/qualcomm/geniex-cli:latest > $@ && echo ghcr.io/qualcomm/geniex-cli:$(VERSION) >> $@",
92+
cmd = "echo docker.io/qualcomm/geniex:latest > $@ && echo docker.io/qualcomm/geniex:$(VERSION) >> $@",
9393
target_compatible_with = ["@platforms//os:linux"],
9494
)
9595

docs/cn/resources/troubleshooting.mdx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,9 @@ import Feedback from "/snippets/page-feedback.mdx";
5757
<Accordion title="`docker pull` 报权限错误 / 未授权">
5858
需要同时满足两点:
5959

60-
1. **镜像仓库登录。** 登录你拉取所用的仓库
60+
1. **镜像仓库登录。** Docker Hub(`docker.io/qualcomm/geniex`)是公开的,无需登录。Qualcomm Container Registry 则需先登录
6161

6262
```bash bash
63-
# GitHub Container Registry — PAT (classic) with at least read:packages:
64-
export GITHUB_TOKEN=ghp_xxxxxxxxxxxxxxxxxxxxxx
65-
docker login ghcr.io -u <your-github-username> -p "$GITHUB_TOKEN"
66-
6763
# Qualcomm Container Registry:
6864
docker login docker-registry.qualcomm.com -u '$app' -p GB2S6KXMJXTPV8VHNFNS7Q6LVH75LOOBTLT8D723WUX6PSFZMTX95GIQG4EFWH5C021ONZ5763VI9IDHU96Q7VAZJ2830CLX3NPI6STQOJWRYXLLA2ZYTL1S
6965
```

docs/cn/run/linux/install.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,8 @@ Linux Docker 路径通过 Linux ARM64 容器镜像运行,并支持 NPU 访问
1818
镜像同时发布到两个仓库——选择你有权限的一个,设置 `IMAGE` 后再拉取:
1919

2020
```bash bash
21-
# Option A — GitHub Container Registry (PAT with read:packages):
22-
export GITHUB_TOKEN=ghp_xxxxxxxxxxxxxxxxxxxxxx
23-
docker login ghcr.io -u <your-github-username> -p "$GITHUB_TOKEN"
24-
IMAGE=ghcr.io/qualcomm/geniex-cli:latest
21+
# Option A — Docker Hub (公开,无需登录):
22+
IMAGE=docker.io/qualcomm/geniex:latest
2523

2624
# Option B — Qualcomm Container Registry:
2725
docker login docker-registry.qualcomm.com -u '<username>' -p '<token>'

docs/en/resources/troubleshooting.mdx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,9 @@ import Feedback from "/snippets/page-feedback.mdx";
5757
<Accordion title="`docker pull` fails with permission / unauthorized">
5858
Two separate things have to be right:
5959

60-
1. **Registry login.** Log in to whichever registry you pull from:
60+
1. **Registry login.** Docker Hub (`docker.io/qualcomm/geniex`) is public and needs no login. For the Qualcomm Container Registry, log in first:
6161

6262
```bash bash
63-
# GitHub Container Registry — PAT (classic) with at least read:packages:
64-
export GITHUB_TOKEN=ghp_xxxxxxxxxxxxxxxxxxxxxx
65-
docker login ghcr.io -u <your-github-username> -p "$GITHUB_TOKEN"
66-
6763
# Qualcomm Container Registry:
6864
docker login docker-registry.qualcomm.com -u '$app' -p GB2S6KXMJXTPV8VHNFNS7Q6LVH75LOOBTLT8D723WUX6PSFZMTX95GIQG4EFWH5C021ONZ5763VI9IDHU96Q7VAZJ2830CLX3NPI6STQOJWRYXLLA2ZYTL1S
6965
```

docs/en/run/linux/install.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,8 @@ The Linux Docker path runs through a container image built for Linux ARM64 with
1818
The image is published to two registries — pick whichever you have access to and set `IMAGE` accordingly, then pull:
1919

2020
```bash bash
21-
# Option A — GitHub Container Registry (PAT with read:packages):
22-
export GITHUB_TOKEN=ghp_xxxxxxxxxxxxxxxxxxxxxx
23-
docker login ghcr.io -u <your-github-username> -p "$GITHUB_TOKEN"
24-
IMAGE=ghcr.io/qualcomm/geniex-cli:latest
21+
# Option A — Docker Hub (public, no login required):
22+
IMAGE=docker.io/qualcomm/geniex:latest
2523

2624
# Option B — Qualcomm Container Registry:
2725
docker login docker-registry.qualcomm.com -u '<username>' -p '<token>'

0 commit comments

Comments
 (0)