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