Skip to content

Commit

Permalink
ci: use a different variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorwhitney committed Oct 16, 2024
1 parent 9d47e6c commit d651f21
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/logql-analyzer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scripts/helm-tagged-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
4 changes: 2 additions & 2 deletions .github/workflows/scripts/helm-weekly-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit d651f21

Please sign in to comment.