ShokoAnime / ShokoServer

Repository for Shoko Server.
https://shokoanime.com/
MIT License
404 stars 74 forks source link

update git workflows and dockerfile #998

Closed revam closed 1 year ago

revam commented 2 years ago

Changes

revam commented 2 years ago

Do feel free to suggest changes and/or fixes. I haven't tested the actions yet since i don't know how to test them beforehand.

revam commented 2 years ago

I've tested the docker build locally though.

Cazzar commented 2 years ago

Are you able to provide image sizes of the different builds locally?

Alternatively, we could just keep the .dockerignore the same and use the env GITHUB_SHA

see: https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables

revam commented 2 years ago

The workflows are still untested. Will see if i can manage to test them tomorrow... I don't have enough time right now to do it.

Cazzar commented 2 years ago

Further investigation /p:Version={VersionNumber} might work better, if we can get rid of the shared assembly info

revam commented 2 years ago

Personally I find the SharedAssemblyInfo.cs useful for programmatically modifying the assembly info. But if anyone have a better way to do it (it -> add a release channel and git sha digest to automated builds), then by all means, do tell.

Also do note that this PR have nothing to do with automated build numbers/version-changes. That will happen in another PR (if I'm the one doing it) since I don't want to delay this PR any longer.

da3dsoul commented 2 years ago

I'm not sure if sed will work on the windows builds. We'll find out, I guess

revam commented 2 years ago

So I need to fix the sed usage on windows and maybe the Compress-Archive usage on linux.

revam commented 2 years ago

Removed sed.

revam commented 2 years ago

Also, the Compress-Archive cmdlet is available in linux.

revam commented 2 years ago

I need to find a better way to get the previous tag... the current action module (or whatever it's called) it uses only grabs the last tag... which is not ideal when we have tags for both the server and the plugin abstractions in the same repo, also they won't conform to the required version format if they have a prefix (e.g. "v", etc.)..

revam commented 1 year ago

I think it's ready.

revam commented 1 year ago

It was not ready. Also, managed to actually test some aspects of the workflows locally. Will unmark it as a draft when I fix it... again.

revam commented 1 year ago

I've tested all I could manage locally.