From 3bd8b97ba9be84ea2fc69e96babeb4d5cead2c24 Mon Sep 17 00:00:00 2001 From: hangpersonal Date: Sun, 19 Oct 2025 15:42:40 -0700 Subject: [PATCH] Add .gitea/workflows/*.yaml --- .gitea/workflows/012_pat.yaml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/012_pat.yaml b/.gitea/workflows/012_pat.yaml index fe77631..815e507 100644 --- a/.gitea/workflows/012_pat.yaml +++ b/.gitea/workflows/012_pat.yaml @@ -26,10 +26,14 @@ jobs: - name: Ensure local 'main' tracks origin/main (for Gitea runners) run: | - git fetch origin main --tags - # Force-create/update local main to point at remote - git branch -f main origin/main - git checkout main + # make sure we have everything + git fetch origin main --tags --prune + # be on main (no-op if already there) + git checkout main || git switch main + # hard update the working tree to match origin/main + git reset --hard origin/main + # ensure upstream is set (harmless if already set) + git branch --set-upstream-to=origin/main main git config user.name "hangpersonal" git config user.email "hangcui1201@gmail.com"