From 2b927610910e453a42b9cc1a5ac38219b2bdf635 Mon Sep 17 00:00:00 2001 From: Gagan Trivedi Date: Mon, 3 Mar 2025 10:56:07 +0530 Subject: [PATCH 1/5] test ci release --- .github/workflows/release.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 9ff7742d..988906f2 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,7 +1,9 @@ name: Release Charts on: - workflow_dispatch: + push: + branches: + - test-ci-release jobs: release: From 9543c0ba956adb7fe176fd43b5a65e2613c151f6 Mon Sep 17 00:00:00 2001 From: Gagan Trivedi Date: Mon, 3 Mar 2025 11:00:38 +0530 Subject: [PATCH 2/5] test diff --- .github/workflows/release.yaml | 4 ++-- charts/flagsmith/values.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 988906f2..80cc048f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -38,8 +38,8 @@ jobs: with: version: v3.3.0 - - name: Run chart-testing (lint) - run: ct lint --config ct.yaml --lint-conf lintconf.yaml + # - name: Run chart-testing (lint) + # run: ct lint --config ct.yaml --lint-conf lintconf.yaml - name: Run chart-releaser uses: helm/chart-releaser-action@v1.2.0 diff --git a/charts/flagsmith/values.yaml b/charts/flagsmith/values.yaml index 7e2e9989..61bef537 100644 --- a/charts/flagsmith/values.yaml +++ b/charts/flagsmith/values.yaml @@ -393,7 +393,7 @@ hpa: enabled: false minReplicas: 2 maxReplicas: 10 - targetCPUUtilization: 50 + targetCPUUtilization: 55 ingress: frontend: From d897e11a1f2d29f3b5a0b3698820a6f657ae76c5 Mon Sep 17 00:00:00 2001 From: Gagan Trivedi Date: Mon, 3 Mar 2025 11:16:46 +0530 Subject: [PATCH 3/5] skip release if version bump is needed --- .github/workflows/release.yaml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 80cc048f..ead7e115 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -38,10 +38,18 @@ jobs: with: version: v3.3.0 - # - name: Run chart-testing (lint) - # run: ct lint --config ct.yaml --lint-conf lintconf.yaml + - name: Run chart-testing (lint) + id: lint + run: | + if ct lint --config ct.yaml --lint-conf lintconf.yaml 2>&1 | grep -q "Chart version not ok. Needs a version bump"; then + echo "version_bump_needed=true" >> "$GITHUB_OUTPUT" + exit 1 + else + echo "version_bump_needed=false" >> "$GITHUB_OUTPUT" + fi - name: Run chart-releaser + if: steps.lint.outputs.version_bump_needed == 'false' uses: helm/chart-releaser-action@v1.2.0 env: CR_TOKEN: '${{ secrets.GITHUB_TOKEN }}' From 5dd01afa47d85fc83c16f778ee94116e6fc9a45e Mon Sep 17 00:00:00 2001 From: Gagan Trivedi Date: Mon, 3 Mar 2025 11:19:06 +0530 Subject: [PATCH 4/5] emit warning instead of exit 1 --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index ead7e115..ba1a0c1e 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -42,8 +42,8 @@ jobs: id: lint run: | if ct lint --config ct.yaml --lint-conf lintconf.yaml 2>&1 | grep -q "Chart version not ok. Needs a version bump"; then + echo "::warning::Version bump is required!" echo "version_bump_needed=true" >> "$GITHUB_OUTPUT" - exit 1 else echo "version_bump_needed=false" >> "$GITHUB_OUTPUT" fi From 518bea4699a7335ca72c2ce209037113ea12c70a Mon Sep 17 00:00:00 2001 From: Gagan Trivedi Date: Mon, 3 Mar 2025 11:22:29 +0530 Subject: [PATCH 5/5] move log level to info --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index ba1a0c1e..0ca13d5a 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -42,7 +42,7 @@ jobs: id: lint run: | if ct lint --config ct.yaml --lint-conf lintconf.yaml 2>&1 | grep -q "Chart version not ok. Needs a version bump"; then - echo "::warning::Version bump is required!" + echo "::notice::Skipping release because no version bump was detected" echo "version_bump_needed=true" >> "$GITHUB_OUTPUT" else echo "version_bump_needed=false" >> "$GITHUB_OUTPUT"