Update update-factorio-modlist.yml
This commit is contained in:
@@ -2,6 +2,10 @@ name: Update mods.json
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
paths:
|
||||||
|
- 'Factorio/**'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
update-mods:
|
update-mods:
|
||||||
@@ -16,12 +20,12 @@ jobs:
|
|||||||
REPO: FastDL
|
REPO: FastDL
|
||||||
BRANCH: main
|
BRANCH: main
|
||||||
run: |
|
run: |
|
||||||
echo "Token length: ${#GITEA_TOKEN}" # debug
|
echo "Token length: ${#GITEA_TOKEN}"
|
||||||
|
|
||||||
response=$(curl -s -H "Authorization: token $GITEA_TOKEN" \
|
response=$(curl -s -H "Authorization: token $GITEA_TOKEN" \
|
||||||
"$GITEA_API_URL/repos/$OWNER/$REPO/contents/Factorio?ref=$BRANCH")
|
"$GITEA_API_URL/repos/$OWNER/$REPO/contents/Factorio?ref=$BRANCH")
|
||||||
|
|
||||||
echo "API Response: $response" # debug
|
echo "API Response: $response"
|
||||||
|
|
||||||
zip_files=$(echo "$response" \
|
zip_files=$(echo "$response" \
|
||||||
| jq -r '.[] | select(.type=="file") | select(.name|endswith(".zip")) | .name')
|
| jq -r '.[] | select(.type=="file") | select(.name|endswith(".zip")) | .name')
|
||||||
|
|||||||
Reference in New Issue
Block a user