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