From 27d30145e00f98cbe9f7e046b826309eb6ab7bdf Mon Sep 17 00:00:00 2001 From: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Date: Sun, 9 Jun 2024 11:51:45 +0300 Subject: [PATCH] chore(ci): automatically update cache key on format change Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> --- .github/workflows/charts-release.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/charts-release.yaml b/.github/workflows/charts-release.yaml index a981c3a5a51..fa6e96fa21f 100644 --- a/.github/workflows/charts-release.yaml +++ b/.github/workflows/charts-release.yaml @@ -20,12 +20,20 @@ jobs: token: ${{ secrets.BOT_TOKEN }} fetch-depth: 0 + - name: Get Changelog Format Version + shell: bash + run: | + ver=$(./charttool genchangelog format-version) + key="changelog-json-format-$ver" + echo "Cache Key is: $key" + echo "CHANGELOG_CACHE_KEY=$key" >> $GITHUB_ENV + - name: Cache Changelog id: cache-changelog uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4 with: path: changelog.json.gz - key: changelog-json-format-2 + key: ${{ env.CHANGELOG_CACHE_KEY }} - name: Generate Changelog shell: bash