From a608f5561aea8e748ce536a7997a005e521a1879 Mon Sep 17 00:00:00 2001 From: LukeGus Date: Tue, 6 Oct 2026 19:41:44 -0500 Subject: [PATCH] chore: publish docker images to termix-ssh on ghcr and termixssh on docker hub --- .github/workflows/beta-release.yml | 2 +- .github/workflows/docker.yml | 40 ++++++++++++++++++++++-------- 2 files changed, 30 insertions(+), 12 deletions(-) diff --git a/.github/workflows/beta-release.yml b/.github/workflows/beta-release.yml index a51d49f75..268ee4281 100644 --- a/.github/workflows/beta-release.yml +++ b/.github/workflows/beta-release.yml @@ -151,7 +151,7 @@ jobs: > Found a bug? [Open a Beta Feedback report](https://github.com/Termix-SSH/Support/issues/new?template=beta_feedback.yml) and mention this build: \`${{ needs.prep.outputs.beta_version }}\`. **Snapshot of:** \`${{ needs.prep.outputs.dev_branch }}\` @ \`${{ needs.prep.outputs.sha }}\` - **Docker image:** \`ghcr.io/lukegus/termix:beta\` / \`docker.io/bugattiguy527/termix:beta\` (rolling), or pin to \`:beta-${{ needs.prep.outputs.beta_version }}\` for this exact build. + **Docker image:** \`ghcr.io/termix-ssh/termix:beta\` / \`docker.io/termixssh/termix:beta\` (rolling), or pin to \`:beta-${{ needs.prep.outputs.beta_version }}\` for this exact build. **Built:** $(date -u +"%Y-%m-%d %H:%M UTC") ### Changes since last beta diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 299ce409d..6097d7280 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -75,24 +75,22 @@ jobs: if [ "$BUILD_TYPE" = "Production" ]; then TAGS+=("release-$VERSION" "$VERSION" "latest") - for tag in "${TAGS[@]}"; do - ALL_TAGS+=("ghcr.io/lukegus/termix:$tag") - ALL_TAGS+=("docker.io/bugattiguy527/termix:$tag") - done elif [ "$BUILD_TYPE" = "Beta" ]; then TAGS+=("beta" "beta-$VERSION") - for tag in "${TAGS[@]}"; do - ALL_TAGS+=("ghcr.io/lukegus/termix:$tag") - ALL_TAGS+=("docker.io/bugattiguy527/termix:$tag") - done else TAGS+=("dev-$VERSION") - for tag in "${TAGS[@]}"; do - ALL_TAGS+=("ghcr.io/lukegus/termix:$tag") - done fi + for tag in "${TAGS[@]}"; do + ALL_TAGS+=("ghcr.io/lukegus/termix:$tag") + ALL_TAGS+=("ghcr.io/termix-ssh/termix:$tag") + if [ "$BUILD_TYPE" != "Development" ]; then + ALL_TAGS+=("docker.io/bugattiguy527/termix:$tag") + fi + done + echo "ALL_TAGS=$(IFS=,; echo "${ALL_TAGS[*]}")" >> $GITHUB_ENV + echo "TAGS=${TAGS[*]}" >> $GITHUB_ENV - name: Login to GHCR if: ${{ !inputs.dry_run }} @@ -125,6 +123,26 @@ jobs: org.opencontainers.image.created=${{ github.run_id }} outputs: ${{ inputs.dry_run && 'type=cacheonly' || 'type=registry,compression=zstd' }} + - name: Login to Docker Hub as termixssh + id: termix_hub + if: ${{ (inputs.build_type == 'Production' || inputs.build_type == 'Beta') && !inputs.dry_run }} + env: + TOKEN: ${{ secrets.DOCKERHUB_TERMIXSSH_TOKEN }} + run: | + if [ -z "$TOKEN" ]; then + echo "DOCKERHUB_TERMIXSSH_TOKEN is not set, skipping docker.io/termixssh" + exit 0 + fi + echo "$TOKEN" | docker login docker.io --username termixssh --password-stdin + echo "ready=true" >> "$GITHUB_OUTPUT" + + - name: Copy image to docker.io/termixssh + if: ${{ steps.termix_hub.outputs.ready == 'true' }} + run: | + for tag in $TAGS; do + docker buildx imagetools create --tag "docker.io/termixssh/termix:$tag" "ghcr.io/termix-ssh/termix:$tag" + done + - name: Cleanup Docker if: always() run: |