Add Gitea tips and tricks for TAs

manuel 2024-10-21 09:17:21 +08:00
parent 55e93252dc
commit 4637ab7e5a

@ -0,0 +1,37 @@
## lfs and gitea actions
bug: https://github.com/actions/checkout/issues/1830#issuecomment-2314758792
solution: checkout lfs object separately
```yaml
name: Run JOJ3 on Push
on: [push]
jobs:
run:
container:
image: focs.ji.sjtu.edu.cn:5000/gitea/runner-images:focs-ubuntu-latest-slim
volumes:
- /home/tt/.config:/home/tt/.config
- /home/tt/.cache:/home/tt/.cache
- /home/tt/.ssh:/home/tt/.ssh
steps:
- name: Check out repository code
uses: https://gitea.com/BoYanZh/checkout@focs
with:
fetch-depth: 0
lfs: false
persist-credentials: 'true'
- name: Checkout lfs
run: |
git lfs install --local
AUTH=$(git config --local http.https://focs.ji.sjtu.edu.cn/.extraheader)
git config --local --unset http.https://focs.ji.sjtu.edu.cn/.extraheader
git config --local http.${{ github.server_url }}/${{ github.repository }}.git/info/lfs/objects/batch.extraheader "$AUTH"
git lfs pull
- name: run joj3
run: |
sudo -E -u tt joj3 -conf-root /home/tt/.config/joj
```