fix: use native git instead of actions/checkout to avoid missing nodejs

This commit is contained in:
sit002 2025-12-01 22:16:54 +08:00
parent d0a4992cd6
commit f46365a317

View File

@ -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