From 647aeab58f9bf4a2ea54fd2a149ec949cc9949f9 Mon Sep 17 00:00:00 2001 From: Trevor Whitney Date: Wed, 16 Oct 2024 11:26:43 -0600 Subject: [PATCH] ci: move crane results to variable for debugging --- .github/workflows/helm-weekly-release-pr.yaml | 3 ++- .github/workflows/scripts/helm-weekly-release.sh | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/helm-weekly-release-pr.yaml b/.github/workflows/helm-weekly-release-pr.yaml index 0b719090baada..14f620150a51c 100644 --- a/.github/workflows/helm-weekly-release-pr.yaml +++ b/.github/workflows/helm-weekly-release-pr.yaml @@ -35,7 +35,8 @@ jobs: - name: Update/regenerate files id: update-k - run: bash .github/workflows/scripts/helm-weekly-release.sh -k + run: | + bash .github/workflows/scripts/helm-weekly-release.sh -k - name: Create Pull Request uses: peter-evans/create-pull-request@v5 diff --git a/.github/workflows/scripts/helm-weekly-release.sh b/.github/workflows/scripts/helm-weekly-release.sh index c15b4a192e606..b9ea4afe65b5d 100755 --- a/.github/workflows/scripts/helm-weekly-release.sh +++ b/.github/workflows/scripts/helm-weekly-release.sh @@ -11,7 +11,9 @@ source "${script_dir}/common.sh" find_latest_image_tag() { local docker_hub_repo=$1 local regExp="^(k|weekly-k)\d+-[a-z0-9]+" - crane ls "${docker_hub_repo}" | grep -P "${regExp}" | sed -E "s/([weekly-]*k[[:digit:]]*)-([^-]*).*/\1-\2/g" | sort -Vur | head -1 + local crane_results + crane_results=$(crane ls "${docker_hub_repo}" | grep -P "${regExp}") + echo "${crane_results}" | sed -E "s/([weekly-]*k[[:digit:]]*)-([^-]*).*/\1-\2/g" | sort -Vur | head -1 } # takes k197-abcdef and returns r197, k197-abcdef-arm64 and returns k197, weekly-k197-abcdef and returns k197