diff --git a/.gitea/workflows/update-factorio-modlist.yml b/.gitea/workflows/update-factorio-modlist.yml index c431983..c4f8286 100644 --- a/.gitea/workflows/update-factorio-modlist.yml +++ b/.gitea/workflows/update-factorio-modlist.yml @@ -2,6 +2,10 @@ name: Update mods.json on: workflow_dispatch: + push: + branches: [ main ] + paths: + - 'Factorio/**' jobs: update-mods: @@ -16,12 +20,12 @@ jobs: REPO: FastDL BRANCH: main run: | - echo "Token length: ${#GITEA_TOKEN}" # debug + echo "Token length: ${#GITEA_TOKEN}" response=$(curl -s -H "Authorization: token $GITEA_TOKEN" \ "$GITEA_API_URL/repos/$OWNER/$REPO/contents/Factorio?ref=$BRANCH") - echo "API Response: $response" # debug + echo "API Response: $response" zip_files=$(echo "$response" \ | jq -r '.[] | select(.type=="file") | select(.name|endswith(".zip")) | .name')