From 2c2fcb70911644c28c2f0b5a8449a0b2fea222f3 Mon Sep 17 00:00:00 2001 From: zl-q Date: Thu, 21 May 2026 16:53:57 +0800 Subject: [PATCH] ci: checkout from runner repository cache --- .gitea/workflows/build-production-docker.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/build-production-docker.yml b/.gitea/workflows/build-production-docker.yml index abbd980..3d586ac 100644 --- a/.gitea/workflows/build-production-docker.yml +++ b/.gitea/workflows/build-production-docker.yml @@ -12,11 +12,16 @@ jobs: env: IMAGE_NAME: eryao-backend IMAGE_SIZE_LIMIT_BYTES: 500000000 + RUNNER_REPO_CACHE: /home/zl/Code/eryao steps: - name: Check out repository run: | set -euo pipefail - git clone --depth 1 --branch "${GITHUB_REF_NAME:-main}" "ssh://git@www.qzselfz.cloud:2222/${GITHUB_REPOSITORY}.git" . + git -C "${RUNNER_REPO_CACHE}" fetch --no-tags origin "${GITHUB_SHA}" + git init . + git remote add origin "${RUNNER_REPO_CACHE}/.git" + git fetch --no-tags --depth=1 origin "${GITHUB_SHA}" + git checkout --detach FETCH_HEAD - name: Validate ECR configuration run: |