Publish to the runner local Gitea registry
CI / test (push) Successful in 29s
CI / publish (push) Failing after 1m13s

This commit is contained in:
Joe Julian
2026-03-28 16:57:18 -07:00
parent 06df58d271
commit 59b5e9e8dd
2 changed files with 5 additions and 5 deletions
+4 -4
View File
@@ -39,12 +39,12 @@ jobs:
- name: Configure Registry Auth
env:
REGISTRY_HOST: ${{ vars.REGISTRY_HOST }}
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
run: |
push_host="$(git remote get-url origin | sed -E 's#^[a-z]+://([^/]+)/.*#\1#')"
mkdir -p "${HOME}/.docker"
auth="$(printf '%s:%s' "${GITHUB_REPOSITORY_OWNER}" "${REGISTRY_PASSWORD}" | base64 -w0)"
printf '{"auths":{"%s":{"auth":"%s"}}}\n' "${REGISTRY_HOST}" "${auth}" > "${HOME}/.docker/config.json"
printf '{"auths":{"%s":{"auth":"%s"}}}\n' "${push_host}" "${auth}" > "${HOME}/.docker/config.json"
chmod 600 "${HOME}/.docker/config.json"
- name: Install ko
@@ -52,8 +52,8 @@ jobs:
- name: Build and Push Image
env:
REGISTRY_HOST: ${{ vars.REGISTRY_HOST }}
KO_DEFAULTBASEIMAGE: gcr.io/distroless/static-debian12:nonroot
run: |
export KO_DOCKER_REPO="${REGISTRY_HOST}/${GITHUB_REPOSITORY_OWNER}"
push_host="$(git remote get-url origin | sed -E 's#^[a-z]+://([^/]+)/.*#\1#')"
export KO_DOCKER_REPO="${push_host}/${GITHUB_REPOSITORY_OWNER}"
ko build --base-import-paths --insecure-registry --sbom=none --tags "main,sha-${GITHUB_SHA}" .