JACOBSMILE / tmodloader1.4

An easy to configure Docker Image for tModLoader 1.4 servers.
Other
139 stars 33 forks source link

Cannot use tmodloader pre-releases #36

Closed ghost closed 1 year ago

ghost commented 1 year ago

I wanted to setup a tmodloader 1.4.4 server, so I ran docker pull jacobsmile/tmodloader1.4:v2023.6.25.20. However, this did not work. Looking into it, I found that you could only specify a version if it was not marked as a pre-release on the tmodloader GitHub. This is likely a problem with the Github actions not running for pre-release versions on the tmodloader github.

ghost commented 1 year ago

This seems to be happening because https://api.github.com/repos/tModLoader/tModLoader/releases/latest does not return pre-releases. It seems like you would need to get all of the releases with https://api.github.com/repos/tModLoader/tModLoader/releases then get the first one

You could do this by replacing curl -sL https://api.github.com/repos/tModLoader/tModLoader/releases/latest | jq -r ".tag_name" with curl -sL https://api.github.com/repos/tModLoader/tModLoader/releases | jq -r "first | .tag_name" in the actions file

ghost commented 1 year ago

This would mess up jacobsmile/tmodloader1.4:latest, however, so we would need a check to see if it is a pre-release before pushing to latest. We would just need to run curl -sL https://api.github.com/repos/tModLoader/tModLoader/releases | jq -r "first | .prerelease", then check if it is equal to true

ghost commented 1 year ago

Also if you do pull this please also manually create an image for v2023.6.25.20, the github actions will only do the latest version