Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DevOps] automatic Workflow for container publish #21

Open
lightlike opened this issue Jul 30, 2022 · 3 comments · May be fixed by #22
Open

[DevOps] automatic Workflow for container publish #21

lightlike opened this issue Jul 30, 2022 · 3 comments · May be fixed by #22

Comments

@lightlike
Copy link

This Repository needs an automatic Deploy job.
I started testing and found a way of doing this. The pipeline can be found in my fork of this (https://github.com/lightlike/docker-avorion)

The job currently only pushes to ghcr but that should be changable with some credentials.

There are still two points I need to discuss.

1. How should versioning work?

My pipeline is currently only setting the tag of the container statically (e.g. stable/beta)
It would be nice for compatibility to set the version for containers but this is only optional as this could bring instability.

This could be done using one of the following methods:

  1. set version as manual parameter (only manual triggering) or via a push
  2. get the version via https://api.steampowered.com/ISteamNews/GetNewsForApp/v2/?appid=445220&count=1&tags=patchnotes and grep

The second possibility is only as reliable as the posts from the dev team but would mean that the pipeline could run automatically.

2. Should this pipeline run automatically?

If the automatic versioning should be used. The build could run daily and the would be no maintanance except for errors.
This would not be a Problem when using the free plan as you get 2,000 min/month and the pipeline currently takes one minute.
This maybe could also be triggered using some e-mail hook or similar but that is not supported by github and one would need to run a third party tool for that.

@rfvgyhn
Copy link
Owner

rfvgyhn commented Jul 30, 2022

I'd like to keep the full game version which I think rules out scraping patch notes. I currently get this from the server binary (AvorionServer --version). I'd also like the readme to be kept up to date automatically.

An automatic pipeline would be great though. Just a few ideas that could be worth looking into:

  • Does steam offer a way to download single binaries from a depot? If so, we could periodically download AvorionServer and run the job based off that.
  • Does steamdb offer an api (or some reliable way to know if a depot branch has been updated)?
  • Perhaps the devs would be open to providing a stable location for querying for the latest version of the game.

@lightlike
Copy link
Author

I have the version working by just Running a steamcmd container and installing Avorion there.
This will only get the current Version.
I have tried to find any way of getting the version otherwise or downloading a depot using the steam API but no luck.

The last thing missing is the checking if the build has to run. I would try to use Tags or (Pre-)Releases for that.
That would also allow to have the Readme static and let shields.io get the Version from the Releases.
After that the Builds could just run Daily and not publish if there are no changes.

The only Problem, that I could see with that is that the version for the beta tag show the stable number if there is a stable release later than the beta. I have no idea if or when this could come up but I'll try some stuff.

@lightlike
Copy link
Author

lightlike commented Aug 1, 2022

The Pipeline should be done.
The only changes needed are some small ones like the shields.io links, the trigger and the login to docker hub if you do not want to use ghcr.

I had to change the way latest works because I need a static way to set the tags. So that now constantly links to stable.
I already changed the Readme to reflect those changes.

Please look into my changes and tell me everything you might want changed.

@lightlike lightlike linked a pull request Aug 2, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants