From b8b42bb3fa50764686423c4428990a0de3a901c4 Mon Sep 17 00:00:00 2001 From: Richard Mrasek Date: Thu, 11 Jun 2026 15:32:50 +0200 Subject: [PATCH] hardcode URL for runner --- .gitea/workflows/docker-publish.yml | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/.gitea/workflows/docker-publish.yml b/.gitea/workflows/docker-publish.yml index 3829b4e..55e657c 100644 --- a/.gitea/workflows/docker-publish.yml +++ b/.gitea/workflows/docker-publish.yml @@ -16,9 +16,7 @@ jobs: - name: Checkout repository (shell) run: | REPO_DIR="repo" - SERVER_URL="${GITHUB_SERVER_URL:-$GITEA_SERVER_URL}" - SERVER_SCHEME="https" - SERVER_HOST="${SERVER_URL}" + REPO_CLONE_URL="https://gitea.dataprovider01.sandbox-cat-dat.simpl-europe.eu/j.r/template-code-location.git" CLONE_USER="${{ secrets.REGISTRY_USERNAME }}" CLONE_PASS="${{ secrets.REGISTRY_PASSWORD }}" REF_NAME="${GITHUB_REF_NAME}" @@ -26,30 +24,16 @@ jobs: REF_NAME="${GITHUB_REF#refs/heads/}" fi - if [ -z "${SERVER_URL}" ]; then - echo "Missing GITHUB_SERVER_URL/GITEA_SERVER_URL" - exit 1 - fi - if [ -z "${CLONE_USER}" ] || [ -z "${CLONE_PASS}" ]; then echo "Missing REGISTRY_USERNAME or REGISTRY_PASSWORD secret" exit 1 fi - case "${SERVER_URL}" in - http://*) - SERVER_SCHEME="http" - SERVER_HOST="${SERVER_URL#http://}" - ;; - https://*) - SERVER_SCHEME="https" - SERVER_HOST="${SERVER_URL#https://}" - ;; - esac - rm -rf "${REPO_DIR}" + AUTH_HEADER="$(printf '%s:%s' "${CLONE_USER}" "${CLONE_PASS}" | base64 | tr -d '\n')" git clone --depth 1 --branch "${REF_NAME}" \ - "${SERVER_SCHEME}://${CLONE_USER}:${CLONE_PASS}@${SERVER_HOST}/${GITHUB_REPOSITORY}.git" \ + -c "http.extraHeader=Authorization: Basic ${AUTH_HEADER}" \ + "${REPO_CLONE_URL}" \ "${REPO_DIR}" if [ ! -f "${REPO_DIR}/Dockerfile" ]; then