audiobookshelf
audiobookshelf copied to clipboard
[Enhancement]: Add commit hash to server page
Describe the feature/enhancement
Adding the commit hash to the server settings page would be handy for issues reported by users on :edge. Something similar to how Mealie does it would be good (pictured below).
Then, there can just be a text box in the issue template for the hash to be pasted into if the reporter is not using a release.
Are they building on every commit? We might be able to pass something through from the gh action to the Docker file
I'm not sure. I think it is built on every commit and it just passed through. Those commit hashes match up to commits in GH but I'm not updating on every commit and haven't paid enough attention to when it changes. (Referring to Mealie)
After additional research, we can use GITHUB_SHA in a workflow to get the commit hash of the commit that triggers the workflow. https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables
It looks like Mealie just uses an internal environment variable for this. https://github.com/mealie-recipes/mealie/blob/dabd93c91915c7531686bebe29634d28ab456275/mealie/core/settings/settings.py#L56
Another option is overwriting the value in a "constants" file during the workflow so any build images will use the SHA. Not sure how to also do that when building from source (outside of workflow), but if building from source the user would be able to get the hash from their local repo.