diff --git a/.github/workflows/helm-releaser-testkube-charts.yaml b/.github/workflows/helm-releaser-testkube-charts.yaml index 7e750a0fd..63cc4c4ed 100644 --- a/.github/workflows/helm-releaser-testkube-charts.yaml +++ b/.github/workflows/helm-releaser-testkube-charts.yaml @@ -16,7 +16,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: fetch-depth: 0 @@ -47,6 +47,7 @@ jobs: uses: helm/chart-releaser-action@v1.6.0 with: charts_dir: charts + mark_as_latest: true env: CR_TOKEN: "${{ secrets.CI_BOT_TOKEN }}" CR_SKIP_EXISTING: true @@ -255,7 +256,7 @@ jobs: - name: Get Latest Tag id: get_latest_tag run: | - latest_tag=$(git describe --abbrev=0 --tags) + latest_tag=$(git tag -l | grep -E "^testkube-[0-9]+\.[0-9]+\.[0-9]+$" | sort -V | tail -n 1) echo "::set-output name=latest_tag::${latest_tag}" echo $latest_tag @@ -265,6 +266,8 @@ jobs: run: | previous_tag=$(git describe --abbrev=0 --tags ${TAG}^) echo "::set-output name=previous_tag::${previous_tag}" + + echo $previous_tag env: TAG: ${{ steps.get_latest_tag.outputs.latest_tag }} diff --git a/.github/workflows/helm-releaser-testkube-main-chart-only.yaml b/.github/workflows/helm-releaser-testkube-main-chart-only.yaml index a741f2764..a7edb2165 100644 --- a/.github/workflows/helm-releaser-testkube-main-chart-only.yaml +++ b/.github/workflows/helm-releaser-testkube-main-chart-only.yaml @@ -25,7 +25,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: fetch-depth: 0 @@ -44,6 +44,7 @@ jobs: uses: helm/chart-releaser-action@v1.6.0 with: charts_dir: charts + mark_as_latest: true env: CR_TOKEN: "${{ secrets.CI_BOT_TOKEN }}" CR_SKIP_EXISTING: true @@ -251,7 +252,7 @@ jobs: - name: Get Latest Tag id: get_latest_tag run: | - latest_tag=$(git describe --abbrev=0 --tags) + latest_tag=$(git tag -l | grep -E "^testkube-[0-9]+\.[0-9]+\.[0-9]+$" | sort -V | tail -n 1) echo "::set-output name=latest_tag::${latest_tag}" echo $latest_tag @@ -261,6 +262,8 @@ jobs: run: | previous_tag=$(git describe --abbrev=0 --tags ${TAG}^) echo "::set-output name=previous_tag::${previous_tag}" + + echo $previous_tag env: TAG: ${{ steps.get_latest_tag.outputs.latest_tag }}