From 4a3b10d013f36e7956204647c863baa43757b8c3 Mon Sep 17 00:00:00 2001 From: Frank Hamand Date: Wed, 4 Oct 2023 17:28:46 +0100 Subject: [PATCH 1/4] Annoyingly OCI repos aren't cached by helm/helmfile, switch to gh-pages --- .github/workflows/release-chart.yaml | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/.github/workflows/release-chart.yaml b/.github/workflows/release-chart.yaml index 5f7949b..a873512 100644 --- a/.github/workflows/release-chart.yaml +++ b/.github/workflows/release-chart.yaml @@ -18,8 +18,7 @@ jobs: runs-on: ubuntu-latest permissions: - contents: read - packages: write + contents: write steps: - name: Checkout @@ -35,16 +34,10 @@ jobs: run: | sed -i 's/^version: \(.*\)$/version: \1-${{ github.sha }}/g' charts/housewatch/Chart.yaml - - name: Helm login - run: | - echo ${{ secrets.GITHUB_TOKEN }} | helm registry login ghcr.io -u $ --password-stdin - - - name: Helm package - run: | - helm dependency update charts/housewatch/ - helm package charts/housewatch - - - name: Helm push - run: | - helm push housewatch-*.tgz oci://ghcr.io/posthog/housewatch/charts - + - name: Run chart-releaser + uses: helm/chart-releaser-action@ed43eb3 + if: github.repository == 'PostHog/charts-clickhouse' + env: + CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + with: + skip_existing: true From 7d79aaefd0c835d0eaadaa721c73b781464c5f78 Mon Sep 17 00:00:00 2001 From: Frank Hamand Date: Wed, 4 Oct 2023 17:29:30 +0100 Subject: [PATCH 2/4] Full sha --- .github/workflows/release-chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-chart.yaml b/.github/workflows/release-chart.yaml index a873512..53b133d 100644 --- a/.github/workflows/release-chart.yaml +++ b/.github/workflows/release-chart.yaml @@ -35,7 +35,7 @@ jobs: sed -i 's/^version: \(.*\)$/version: \1-${{ github.sha }}/g' charts/housewatch/Chart.yaml - name: Run chart-releaser - uses: helm/chart-releaser-action@ed43eb3 + uses: helm/chart-releaser-action@ed43eb303604cbc0eeec8390544f7748dc6c790d if: github.repository == 'PostHog/charts-clickhouse' env: CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" From 074a7c73dbee6ee686d53bd9c4d08f5a9808b6a7 Mon Sep 17 00:00:00 2001 From: Frank Hamand Date: Wed, 4 Oct 2023 17:42:45 +0100 Subject: [PATCH 3/4] Update release-chart.yaml --- .github/workflows/release-chart.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/release-chart.yaml b/.github/workflows/release-chart.yaml index 53b133d..cb75f24 100644 --- a/.github/workflows/release-chart.yaml +++ b/.github/workflows/release-chart.yaml @@ -1,7 +1,7 @@ name: Release Chart on: - pull_request: + pull_request_target: paths: - charts/** - .github/workflows/release-chart.yaml @@ -36,7 +36,6 @@ jobs: - name: Run chart-releaser uses: helm/chart-releaser-action@ed43eb303604cbc0eeec8390544f7748dc6c790d - if: github.repository == 'PostHog/charts-clickhouse' env: CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" with: From 9fb44b2b09802cbd76aa392d7ed131ec094f81ea Mon Sep 17 00:00:00 2001 From: Frank Hamand Date: Wed, 4 Oct 2023 17:59:58 +0100 Subject: [PATCH 4/4] Update release-chart.yaml --- .github/workflows/release-chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-chart.yaml b/.github/workflows/release-chart.yaml index cb75f24..afe6a36 100644 --- a/.github/workflows/release-chart.yaml +++ b/.github/workflows/release-chart.yaml @@ -1,7 +1,7 @@ name: Release Chart on: - pull_request_target: + pull_request: paths: - charts/** - .github/workflows/release-chart.yaml