From d651f21a812ca870936bf43af73a92e74893c7b9 Mon Sep 17 00:00:00 2001 From: Trevor Whitney Date: Wed, 16 Oct 2024 16:44:39 -0600 Subject: [PATCH] ci: use a different variable name --- .github/workflows/logql-analyzer.yml | 15 ++++++++------- .github/workflows/scripts/helm-tagged-release.sh | 2 +- .github/workflows/scripts/helm-weekly-release.sh | 4 ++-- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/logql-analyzer.yml b/.github/workflows/logql-analyzer.yml index 131db7e33f3f..1a1f14515b1c 100644 --- a/.github/workflows/logql-analyzer.yml +++ b/.github/workflows/logql-analyzer.yml @@ -24,24 +24,25 @@ jobs: with: fetch-tags: true - - name: Run shell command - id: prepare + - id: prepare env: MAJOR_MINOR_VERSION_REGEXP: '([0-9]+\\.[0-9]+)' RELEASE_TAG_REGEXP: '^([0-9]+\\.[0-9]+\\.[0-9]+)$' run: | echo $("${WORKSPACE_ROOT}/loki/tools/image-tag") > .tag - if [[ "${RELEASE_VERSION}" == "test" ]]; then + version="${RELEASE_VERSION}" + if [[ "${version}" == "test" ]]; then echo "RELEASE_VERSION is not set, using image tag" - RELEASE_VERSION=$(cat .tag) + version=$(cat .tag) fi + echo "RELEASE_VERSION: $version" # if the tag matches the pattern `D.D.D` then RELEASE_NAME="D-D-x", otherwise RELEASE_NAME="next" - RELEASE_NAME=$([[ $RELEASE_VERSION =~ $RELEASE_TAG_REGEXP ]] && echo $RELEASE_TAG | grep -oE $MAJOR_MINOR_VERSION_REGEXP | sed "s/\\./-/g" | sed "s/$/-x/" || echo "next") + RELEASE_NAME=$([[ $version =~ $RELEASE_TAG_REGEXP ]] && echo $RELEASE_TAG | grep -oE $MAJOR_MINOR_VERSION_REGEXP | sed "s/\\./-/g" | sed "s/$/-x/" || echo "next") echo "RELEASE_NAME: $RELEASE_NAME" - echo "::set-output name=release_version::${RELEASE_VERSION}" - echo "::set-output name=release_name::${RELEASE_NAME}" + echo "release_version=${version}" >> "$GITHUB_OUTPUT" + echo "release_name=${RELEASE_NAME}" >> "$GITHUB_OUTPUT" - id: "get-github-app-token" name: "get github app token" diff --git a/.github/workflows/scripts/helm-tagged-release.sh b/.github/workflows/scripts/helm-tagged-release.sh index fd6c06f520d0..7b50ea8ce9b9 100755 --- a/.github/workflows/scripts/helm-tagged-release.sh +++ b/.github/workflows/scripts/helm-tagged-release.sh @@ -51,4 +51,4 @@ sed --in-place \ make TTY='' helm-docs -echo "::set-output name=new_chart_version::${new_chart_version}" +echo "new_chart_version=${new_chart_version}" >> "$GITHUB_OUTPUT" diff --git a/.github/workflows/scripts/helm-weekly-release.sh b/.github/workflows/scripts/helm-weekly-release.sh index f836b2c694b6..e9c0a897d34d 100755 --- a/.github/workflows/scripts/helm-weekly-release.sh +++ b/.github/workflows/scripts/helm-weekly-release.sh @@ -106,7 +106,7 @@ fi make TTY='' helm-docs -echo "::set-output name=new_chart_version::${new_chart_version}" +echo "new_chart_version=${new_chart_version}" >> "$GITHUB_OUTPUT" if ${k_release}; then - echo "::set-output name=weekly::$(extract_k_version "${latest_loki_tag}")" + echo "weekly=$(extract_k_version "${latest_loki_tag}")" >> "$GITHUB_OUTPUT" fi