From f46365a317766c7ef731f7e34ec695a69f7fa15f Mon Sep 17 00:00:00 2001 From: sit002 Date: Mon, 1 Dec 2025 22:16:54 +0800 Subject: [PATCH] fix: use native git instead of actions/checkout to avoid missing nodejs --- .gitea/workflows/autograde.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/autograde.yml b/.gitea/workflows/autograde.yml index 375dac7..8246443 100644 --- a/.gitea/workflows/autograde.yml +++ b/.gitea/workflows/autograde.yml @@ -34,9 +34,12 @@ jobs: rm -rf /var/lib/apt/lists/* - name: Checkout code - uses: actions/checkout@v3 - with: - fetch-depth: 1 + run: | + git config --global --add safe.directory ${{ github.workspace }} + git init + git remote add origin ${{ github.server_url }}/${{ github.repository }}.git + git fetch --depth=1 origin ${{ github.sha }} + git checkout ${{ github.sha }} - name: Fix permissions run: chown -R $(whoami):$(whoami) ${{ github.workspace }} || true