Update .github/workflows/fetch-upstream-mods.yml
This commit is contained in:
36
.github/workflows/fetch-upstream-mods.yml
vendored
36
.github/workflows/fetch-upstream-mods.yml
vendored
@@ -10,11 +10,31 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Clone Gitea repo
|
- name: Clone Gitea repo (skip LFS smudge)
|
||||||
run: |
|
run: |
|
||||||
rm -rf repo /tmp/upstream
|
rm -rf repo /tmp/upstream
|
||||||
|
GIT_LFS_SKIP_SMUDGE=1 \
|
||||||
git clone ssh://git@smallgit.dasguney.com:2222/skyline/balatro-mod-index.git repo
|
git clone ssh://git@smallgit.dasguney.com:2222/skyline/balatro-mod-index.git repo
|
||||||
|
|
||||||
|
- name: Configure LFS and fetch objects
|
||||||
|
env:
|
||||||
|
GITEA_TOKEN: ${{ secrets.GT_TOKEN }}
|
||||||
|
run: |
|
||||||
|
cd repo
|
||||||
|
|
||||||
|
# Auth for Git + LFS
|
||||||
|
printf "machine smallgit.dasguney.com\nlogin skyline\npassword %s\n" "$GITEA_TOKEN" > ~/.netrc
|
||||||
|
chmod 600 ~/.netrc
|
||||||
|
|
||||||
|
# Force LFS to use direct Gitea endpoint (no nginx)
|
||||||
|
git config lfs.url "http://smallgit.dasguney.com:3000/skyline/balatro-mod-index.git/info/lfs"
|
||||||
|
git config lfs."http://smallgit.dasguney.com:3000/skyline/balatro-mod-index.git/info/lfs".locksverify false
|
||||||
|
|
||||||
|
# Install hooks and explicitly fetch LFS data
|
||||||
|
git lfs install --local
|
||||||
|
git lfs fetch origin
|
||||||
|
git lfs checkout
|
||||||
|
|
||||||
- name: Clone upstream GitHub repo
|
- name: Clone upstream GitHub repo
|
||||||
run: |
|
run: |
|
||||||
git clone https://github.com/skyline69/balatro-mod-index.git /tmp/upstream
|
git clone https://github.com/skyline69/balatro-mod-index.git /tmp/upstream
|
||||||
@@ -34,27 +54,15 @@ jobs:
|
|||||||
done
|
done
|
||||||
|
|
||||||
- name: Commit and push
|
- name: Commit and push
|
||||||
env:
|
|
||||||
GITEA_TOKEN: ${{ secrets.GT_TOKEN }}
|
|
||||||
run: |
|
run: |
|
||||||
cd repo
|
cd repo
|
||||||
|
|
||||||
git config user.name "jim[bot]"
|
git config user.name "jim[bot]"
|
||||||
git config user.email "jim[bot]@users.noreply.github.com"
|
git config user.email "jim[bot]@users.noreply.github.com"
|
||||||
|
|
||||||
# Write .netrc safely (no heredoc)
|
# Use direct Gitea HTTP endpoint for push
|
||||||
printf "machine smallgit.dasguney.com\nlogin skyline\npassword %s\n" "$GITEA_TOKEN" > ~/.netrc
|
|
||||||
chmod 600 ~/.netrc
|
|
||||||
|
|
||||||
# Use direct Gitea HTTP endpoint
|
|
||||||
git remote set-url origin http://smallgit.dasguney.com:3000/skyline/balatro-mod-index.git
|
git remote set-url origin http://smallgit.dasguney.com:3000/skyline/balatro-mod-index.git
|
||||||
|
|
||||||
# Make git-lfs use the same endpoint and disable lock verification
|
|
||||||
git config lfs.url "http://smallgit.dasguney.com:3000/skyline/balatro-mod-index.git/info/lfs"
|
|
||||||
git config lfs."http://smallgit.dasguney.com:3000/skyline/balatro-mod-index.git/info/lfs".locksverify false
|
|
||||||
|
|
||||||
git lfs install --local || true
|
|
||||||
|
|
||||||
git add mods
|
git add mods
|
||||||
if git commit -m "fetch upstream mod changes ($(date --utc +%Y%m%d_%H%M%SZ))"; then
|
if git commit -m "fetch upstream mod changes ($(date --utc +%Y%m%d_%H%M%SZ))"; then
|
||||||
git push origin main
|
git push origin main
|
||||||
|
|||||||
Reference in New Issue
Block a user