From 9da3293592dc30e600bcc3e842545e225085ea90 Mon Sep 17 00:00:00 2001 From: Sam Catlow Date: Thu, 5 Nov 2026 00:32:45 +1100 Subject: [PATCH] ci(publish): name the missing DEPLOY_TOKEN instead of logging in with an empty password Refs https://git.catlow.cloud/sam/archie/issues/1785 --- .github/workflows/publish.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 66d460d..9376b17 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -23,6 +23,17 @@ jobs: go-version-file: go.mod - name: Install skopeo run: sudo apt-get update && sudo apt-get install -y skopeo + # A mirror carries its own Actions secrets. An empty token here logs in + # as an empty password, so the run reports "unauthorized" instead of + # naming what is missing. + - name: Check DEPLOY_TOKEN is configured + env: + DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }} + run: | + if [ -z "$DEPLOY_TOKEN" ]; then + echo "::error::DEPLOY_TOKEN is not set for this repository, so the publish cannot log in to git.catlow.cloud. Set the secret here, or publish from the Gitea primary." + exit 1 + fi - name: Log in to the Gitea registry run: echo "${{ secrets.DEPLOY_TOKEN }}" | skopeo login git.catlow.cloud -u "${{ github.actor }}" --password-stdin - name: Publish packages and the signed catalogue