ABTech / zdaemon

ABTech zdaemon slack/zulip bot
BSD 3-Clause "New" or "Revised" License
2 stars 0 forks source link

Better !ping build stamp #2

Open robsiemb opened 2 weeks ago

robsiemb commented 2 weeks ago

The current build stamp generation returned by !ping is from a time before git, and doesn't really work right for Git.

Ideally, we'd be able to expose the current commit hash in !ping, both when it is running in production under docker, as well as during development just in the source tree. One option would be to use git describe in the later case, and somehow drop a file into the container with the current commit hash in the former.

robsiemb commented 2 weeks ago

github.sha should have the hash during the github workflow to feed into an environment variable for the docker build. (see also https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#github-context)