Apparently I misunderstood the meaning of the latest release in GitHub. The latest release just means the most recent release, not the latest stable release.
We should not use the GetLatestRelease API in GitHub. We need to get all releases, sort them in the semver order and find the latest stable release.
As a workaround, we can use the git command, which allows us to sort the tags in the semver order.
I noticed that the tfupdate suggested downgrading to v0.11.15 a few days ago. That's a funny joke. I live in 2021. 😂
https://github.com/minamijoyo/tfupdate-circleci-example/pull/158
The latest release should be v0.15.1, but the v0.11.15 is marked as the latest.
I found an upstream issue: https://github.com/hashicorp/terraform/issues/28530
Apparently I misunderstood the meaning of the latest release in GitHub. The latest release just means the most recent release, not the latest stable release.
We should not use the
GetLatestRelease
API in GitHub. We need to get all releases, sort them in the semver order and find the latest stable release.As a workaround, we can use the git command, which allows us to sort the tags in the semver order.