From 5155bc1521f1761d53f334e3fdbdf06c7051a4e1 Mon Sep 17 00:00:00 2001 From: Kjeld Schouten Date: Fri, 31 May 2024 11:36:28 +0200 Subject: [PATCH] Update charts-release.yaml Signed-off-by: Kjeld Schouten --- .github/workflows/charts-release.yaml | 46 +++++++++++++-------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/.github/workflows/charts-release.yaml b/.github/workflows/charts-release.yaml index e6383092e92..50b172f6dfd 100644 --- a/.github/workflows/charts-release.yaml +++ b/.github/workflows/charts-release.yaml @@ -20,6 +20,29 @@ jobs: token: ${{ secrets.BOT_TOKEN }} fetch-depth: 0 + - name: Cache Changelog + id: cache-changelog + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4 + with: + path: changelog.json.gz + key: changelog-json + + - name: Generate Changelog + shell: bash + run: | + export REPO_PATH="./" + export TEMPLATE_PATH=".//templates/CHANGELOG.md.tmpl" + export CHARTS_DIR=".//charts" + export JSON_FILE="changelog.json" + rm -rf helm + ls -l + if [ -f "$JSON_FILE.gz" ]; then + gunzip "$JSON_FILE.gz" --force # Force overwrite if file already exists + fi + + ./charttool genchangelog "$REPO_PATH" "$TEMPLATE_PATH" "$CHARTS_DIR" + gzip "$JSON_FILE" --best + - name: Checkout Helm-Staging uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4 with: @@ -52,29 +75,6 @@ jobs: git push cd - - - name: Cache Changelog - id: cache-changelog - uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4 - with: - path: changelog.json.gz - key: changelog-json - - - name: Generate Changelog - shell: bash - run: | - export REPO_PATH="./" - export TEMPLATE_PATH=".//templates/CHANGELOG.md.tmpl" - export CHARTS_DIR=".//charts" - export JSON_FILE="changelog.json" - rm -rf helm - ls -l - if [ -f "$JSON_FILE.gz" ]; then - gunzip "$JSON_FILE.gz" --force # Force overwrite if file already exists - fi - - ./charttool genchangelog "$REPO_PATH" "$TEMPLATE_PATH" "$CHARTS_DIR" - gzip "$JSON_FILE" --best - - name: Checkout uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4 with: