Update .gitea/workflows/update-factorio-modlist.yml
This commit is contained in:
@@ -8,10 +8,8 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Setup Git
|
||||
run: |
|
||||
git config --global user.name "Gitea Action"
|
||||
git config --global user.email "action@gitea.local"
|
||||
- name: Install jq
|
||||
run: sudo apt-get update && sudo apt-get install -y jq
|
||||
|
||||
- name: Get list of .zip files via API
|
||||
env:
|
||||
@@ -34,15 +32,16 @@ jobs:
|
||||
# Scrive mods.json
|
||||
echo "$json_array" > mods.json
|
||||
|
||||
- name: Commit and push mods.json
|
||||
- name: Upload mods.json via API
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||
GITEA_TOKEN: ${{ secrets.gamerarena }}
|
||||
GITEA_API_URL: https://git.garpnet.it/api/v1
|
||||
OWNER: GamerArena
|
||||
REPO: FastDL
|
||||
BRANCH: main
|
||||
run: |
|
||||
# Clona repo temporaneamente
|
||||
git clone https://git.garpnet.it/GamerArena/FastDL.git
|
||||
|
||||
|
||||
# Commit e push
|
||||
git add mods.json
|
||||
git commit -m "Update mods.json with .zip files"
|
||||
git push origin main
|
||||
content=$(base64 -w 0 mods.json)
|
||||
curl -X PUT -H "Authorization: token $GITEA_TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "{\"content\":\"$content\",\"branch\":\"$BRANCH\",\"message\":\"Update mods.json\"}" \
|
||||
"$GITEA_API_URL/repos/$OWNER/$REPO/contents/mods.json"
|
||||
Reference in New Issue
Block a user