Update .github/workflows/fetch-upstream-mods.yml
This commit is contained in:
18
.github/workflows/fetch-upstream-mods.yml
vendored
18
.github/workflows/fetch-upstream-mods.yml
vendored
@@ -2,16 +2,17 @@ name: fetch upstream mod changes
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '13,43 * * * *'
|
- cron: "13,43 * * * *"
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
replace-mods:
|
replace-mods:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Clone Gitea repo via SSH
|
- name: Clone Gitea repo
|
||||||
run: |
|
run: |
|
||||||
rm -rf /tmp/upstream
|
rm -rf repo /tmp/upstream
|
||||||
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: Clone upstream GitHub repo
|
- name: Clone upstream GitHub repo
|
||||||
@@ -38,10 +39,10 @@ jobs:
|
|||||||
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"
|
||||||
|
|
||||||
# Provide HTTP Basic auth to libcurl (works for git + git-lfs), token as PASSWORD
|
# Provide HTTP auth for both git and git-lfs
|
||||||
cat > ~/.netrc <<EOF
|
cat > ~/.netrc <<EOF
|
||||||
machine smallgit.dasguney.com
|
machine smallgit.dasguney.com
|
||||||
login skyline
|
login skyline
|
||||||
@@ -52,15 +53,14 @@ jobs:
|
|||||||
# Use direct Gitea HTTP endpoint (no nginx)
|
# Use direct Gitea HTTP endpoint (no nginx)
|
||||||
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
|
||||||
|
|
||||||
# Force git-lfs to use the same endpoint (otherwise it keeps using https://smallgit...)
|
# Force git-lfs to use the same endpoint and disable locking checks
|
||||||
git config lfs.url "http://smallgit.dasguney.com:3000/skyline/balatro-mod-index.git/info/lfs"
|
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 config lfs."http://smallgit.dasguney.com:3000/skyline/balatro-mod-index.git/info/lfs".locksverify false
|
||||||
|
|
||||||
# If LFS hooks exist, make sure they're installed consistently
|
# Ensure LFS hooks are consistent (or skip if not needed)
|
||||||
git lfs install --local || true
|
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
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user