diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 2482b73..31a71ef 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -49,11 +49,13 @@ jobs: SHA: ${{ github.sha }} TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | + git config --global init.defaultBranch main if [ -f "$GITHUB_WORKSPACE/Dockerfile" ]; then exit 0; fi mkdir -p "$GITHUB_WORKSPACE" cd "$GITHUB_WORKSPACE" git init . if [ -z "$TOKEN" ]; then + echo "Warning: GITHUB_TOKEN is not set. Attempting unauthenticated fetch (will fail for private repos)." git fetch --depth=1 "$SERVER/$REPO.git" "$REF" else git -c http.extraHeader="Authorization: Bearer $TOKEN" fetch --depth=1 "$SERVER/$REPO.git" "$REF"