on: push permissions: contents: write jobs: c: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - run: | echo "[" >catalog.json;c=; for f in *.sune;do [ -f "$f" ]||continue;raw="https://raw.githubusercontent.com/$GITHUB_REPOSITORY/$GITHUB_REF_NAME/$f";s=$(jq '.[0]|del(.pinned,.settings.html,.settings.extension_html,.settings.script)' "$f" 2>/dev/null||echo null);echo "$c {\"name\":\"$f\",\"raw\":\"$raw\",\"sune\":[$s]}">>catalog.json;c=,;done echo "]" >>catalog.json t=$(mktemp);jq . catalog.json>"$t"&&mv "$t" catalog.json git config user.name bot git config user.email bot@users.noreply.github.com git add catalog.json git commit -m update || true git push