Loop over the first 10 versions and will find the stable version.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Signed-off-by: Noah Knegt <git@noahknegt.com>
This commit is contained in:
@@ -19,8 +19,10 @@
|
||||
state: present
|
||||
|
||||
- name: Check if latest version is stable
|
||||
shell: curl -s https://api.github.com/repos/docker/cli/tags | jq -r '.[0].name' | grep -E '^[0-9]+\.[0-9]+\.[0-9]+$'
|
||||
register: docker_latest_version_stable
|
||||
shell: "curl -s https://api.github.com/repos/docker/cli/tags | jq -r '.[{{ item }}].name' | grep -E -o '[0-9]+\\.[0-9]+\\.[0-9]+\\-'"
|
||||
register: docker_latest_version
|
||||
loop: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
|
||||
until: docker_latest_version.stdout.find('-') == -1
|
||||
|
||||
- name: Compare versions
|
||||
set_fact:
|
||||
|
Reference in New Issue
Block a user