Curl within one command
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

Signed-off-by: Noah Knegt <git@noahknegt.com>
This commit is contained in:
2023-03-31 12:20:58 +02:00
parent cdc4dc82b2
commit 1558e114b3

View File

@@ -18,12 +18,8 @@
name: jq
state: present
- name: Fetch versions from github
shell: curl -s https://api.github.com/repos/docker/cli/tags
register: docker_versions
- name: Check if latest version is stable
shell: "{{ docker_versions }} | jq -r '.[{{ item }}].name' | grep -E -o '[0-9]+\\.[0-9]+\\.[0-9]+\\-?'"
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_stable
until: docker_latest_version_stable.stdout is not search('-')
loop: "{{ range(0, 10) | list }}"