From 70644f55ce200bfe5461ee77131516d5aa39bc14 Mon Sep 17 00:00:00 2001 From: Andrew Emelyaneko Date: Wed, 28 Oct 2026 23:33:37 +0300 Subject: [PATCH] ci: manual git checkout using CI_TOKEN (private repo) --- .gitea/workflows/ci.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 0aab525..0322aea 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -12,7 +12,17 @@ jobs: runs-on: docker steps: - name: Checkout code - uses: actions/checkout@v4 + env: + CI_TOKEN: ${{ secrets.CI_TOKEN }} + run: | + git init -q + git remote add origin "http://10.8.0.52:8080/andrew/plagin_tokens.git" + if [ -n "${GITHUB_SHA:-}" ]; then + git -c http.extraheader="Authorization: token ${CI_TOKEN}" fetch -q --depth 1 origin "${GITHUB_SHA}" + else + git -c http.extraheader="Authorization: token ${CI_TOKEN}" fetch -q --depth 1 origin main + fi + git checkout -q FETCH_HEAD - name: Install Bun run: | apk add --no-cache bash curl unzip