This commit is contained in:
parent
8ce95e38a8
commit
383028fcca
2 changed files with 15 additions and 2 deletions
|
@ -29,7 +29,6 @@ for mod in glob.glob("pack/mods/*.toml"):
|
|||
moddata["site"] = "Modrinth"
|
||||
|
||||
data = requests.get("https://api.modrinth.com/v2/project/" + id).json()
|
||||
print("Processed: " + moddata["name"])
|
||||
elif "curseforge" in data["update"]:
|
||||
moddata["url"] = "https://legacy.curseforge.com/projects/" + str(data["update"]["curseforge"]["project-id"])
|
||||
moddata["site"] = "CurseForge"
|
||||
|
@ -93,7 +92,7 @@ with open("wiki/Licenses.md", "w") as f:
|
|||
data = mods[mod]
|
||||
f.write("## " + mod + "\r\n")
|
||||
f.write("<b>")
|
||||
if data["license"] != None:
|
||||
if "license" in data:
|
||||
if data["license"]["url"] != None:
|
||||
f.write("<a href=\"" + data["license"]["url"] + "\">" + data["license"] + "")
|
||||
else:
|
||||
|
|
|
@ -17,9 +17,23 @@ jobs:
|
|||
path: "wiki"
|
||||
ref: "main"
|
||||
|
||||
- name: Restore cached licenses
|
||||
id: cache-licenses-restore
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: licenses.json
|
||||
key: ${{ runner.os }}-licenses
|
||||
|
||||
- name: "Update modlist"
|
||||
run: python pack/.forgejo/scripts/update-wiki.py
|
||||
|
||||
- name: Save cached licenses
|
||||
id: cache-licenses-restore
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: licenses.json
|
||||
key: ${{ steps.cache-licenses-restore.outputs.cache-primary-key }}
|
||||
|
||||
- name: "Commit changes"
|
||||
run: |
|
||||
cd wiki
|
||||
|
|
Loading…
Reference in a new issue