chore(ci): automatically update cache key on format change

Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
This commit is contained in:
Stavros Kois 2024-06-09 11:51:45 +03:00 committed by GitHub
parent 3b1758d676
commit 27d30145e0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 1 deletions

View File

@ -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