meilisearch icon indicating copy to clipboard operation
meilisearch copied to clipboard

`latest` tag update: do it only if the GitHub release is considered as the latest one

Open curquiza opened this issue 2 years ago • 2 comments

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 -> latest tag will correspond to the v1.10.0 tag
  • then, later, we release v1.1.12 -> latest tag will now correspond to the v1.1.12 tag despite this is not the latest release, v1.10.0 is!

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.

Capture d’écran 2022-12-01 à 17 01 59

curquiza avatar Dec 01 '22 16:12 curquiza

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.

curquiza avatar Dec 09 '22 17:12 curquiza

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.

curquiza avatar Dec 11 '22 20:12 curquiza