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 - name: Configure Registry Auth
env: env:
REGISTRY_HOST: ${{ vars.REGISTRY_HOST }}
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }} REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
run: | run: |
push_host="$(git remote get-url origin | sed -E 's#^[a-z]+://([^/]+)/.*#\1#')"
mkdir -p "${HOME}/.docker" mkdir -p "${HOME}/.docker"
auth="$(printf '%s:%s' "${GITHUB_REPOSITORY_OWNER}" "${REGISTRY_PASSWORD}" | base64 -w0)" 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" chmod 600 "${HOME}/.docker/config.json"
- name: Install ko - name: Install ko
@@ -52,8 +52,8 @@ jobs:
- name: Build and Push Image - name: Build and Push Image
env: env:
REGISTRY_HOST: ${{ vars.REGISTRY_HOST }}
KO_DEFAULTBASEIMAGE: gcr.io/distroless/static-debian12:nonroot KO_DEFAULTBASEIMAGE: gcr.io/distroless/static-debian12:nonroot
run: | 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}" . ko build --base-import-paths --insecure-registry --sbom=none --tags "main,sha-${GITHUB_SHA}" .
+1 -1
View File
@@ -57,7 +57,7 @@ It runs on pushes to `main` and pull requests, and currently:
- runs `go build .` - runs `go build .`
- builds and pushes `:main` and `:sha-<commit>` container tags on pushes to `main` - builds and pushes `:main` and `:sha-<commit>` container tags on pushes to `main`
The workflow expects a runner with the `ubuntu-latest` label, a repository Actions secret named `REGISTRY_PASSWORD`, and a repository variable named `REGISTRY_HOST` for the registry hostname. The workflow expects a runner with the `ubuntu-latest` label and a repository Actions secret named `REGISTRY_PASSWORD`.
The cluster runner deployed for this repo provides the required runner label. The cluster runner deployed for this repo provides the required runner label.