From 3fab27b1667b49d317baeab13c02f2f1586b49e8 Mon Sep 17 00:00:00 2001 From: Aleksandr Meshchriakov Date: Mon, 2 Feb 2026 12:52:39 +0100 Subject: [PATCH] fix(ci): preserve http protocol in git clone URL --- .gitea/workflows/ci-cd.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/ci-cd.yml b/.gitea/workflows/ci-cd.yml index 63c9963..dd51a7a 100644 --- a/.gitea/workflows/ci-cd.yml +++ b/.gitea/workflows/ci-cd.yml @@ -17,7 +17,8 @@ jobs: steps: - name: Checkout code run: | - git clone --depth=1 --branch=${GITHUB_REF_NAME} https://oauth2:${{ gitea.token }}@${GITHUB_SERVER_URL#*://}/${GITHUB_REPOSITORY}.git . + REPO_URL=$(echo ${GITHUB_SERVER_URL} | sed "s|://|://oauth2:${{ gitea.token }}@|") + git clone --depth=1 --branch=${GITHUB_REF_NAME} ${REPO_URL}/${GITHUB_REPOSITORY}.git . git checkout ${GITHUB_SHA} - name: Install Python and uv @@ -52,7 +53,8 @@ jobs: steps: - name: Checkout code run: | - git clone --depth=1 --branch=${GITHUB_REF_NAME} https://oauth2:${{ gitea.token }}@${GITHUB_SERVER_URL#*://}/${GITHUB_REPOSITORY}.git . + REPO_URL=$(echo ${GITHUB_SERVER_URL} | sed "s|://|://oauth2:${{ gitea.token }}@|") + git clone --depth=1 --branch=${GITHUB_REF_NAME} ${REPO_URL}/${GITHUB_REPOSITORY}.git . git checkout ${GITHUB_SHA} - name: Install Python and uv @@ -86,7 +88,8 @@ jobs: steps: - name: Checkout code run: | - git clone --depth=1 --branch=${GITHUB_REF_NAME} https://oauth2:${{ gitea.token }}@${GITHUB_SERVER_URL#*://}/${GITHUB_REPOSITORY}.git . + REPO_URL=$(echo ${GITHUB_SERVER_URL} | sed "s|://|://oauth2:${{ gitea.token }}@|") + git clone --depth=1 --branch=${GITHUB_REF_NAME} ${REPO_URL}/${GITHUB_REPOSITORY}.git . git checkout ${GITHUB_SHA} - name: Build web image @@ -110,7 +113,8 @@ jobs: steps: - name: Checkout code run: | - git clone --depth=1 --branch=${GITHUB_REF_NAME} https://oauth2:${{ gitea.token }}@${GITHUB_SERVER_URL#*://}/${GITHUB_REPOSITORY}.git . + REPO_URL=$(echo ${GITHUB_SERVER_URL} | sed "s|://|://oauth2:${{ gitea.token }}@|") + git clone --depth=1 --branch=${GITHUB_REF_NAME} ${REPO_URL}/${GITHUB_REPOSITORY}.git . git checkout ${GITHUB_SHA} - name: Login to Gitea Container Registry