meilisearch
meilisearch copied to clipboard
`latest` tag update: do it only if the GitHub release is considered as the latest one
Currently our current CI (to move the latest tag to the appropriate commit) will push the latest tag to the latest release in term of times and not in term of version.
For example:
- we release v1.10.0 ->
latesttag will correspond to thev1.10.0tag - then, later, we release v1.1.12 ->
latesttag will now correspond to thev1.1.12tag despite this is not the latest release,v1.10.0is!
We need to run the CI only if the release is considered as the latest one by GitHub.
The latest release is defined this way on GitHub when creating a new GitHub release.
I have not found any way in GitHub action to know if a release created on GitHub is considered the latest or not.
We can get github.event.release.prerelease to know if the release is a pre-release, but nothing like github.event.release.latest
If someone has any clue about when this will be integrated into the GitHub API, or if there is an alternative solution to get quickly the information with the github.event.release object 🙏
I would like to avoid using any side script or to get the latest release via the GitHub API and compare the new created one and the got one.
For your information, to fix this issue (same as this one but with docker tag), we created and use a script in our Docker CI (see this PR).
So it would be possible to use a script to fix this issue as well. However, since this issue is not a big problem (manual and quick workarounds exist, contrary to #3195), we don't need an immediate fix. I would rather wait for an alternative solution using the release object of the GitHub API instead of making another CI depend on our script.