From 9b30b6bd96f43a95a4ab6a795b7e24870d4403bc Mon Sep 17 00:00:00 2001 From: Jean-Baptiste DONNETTE Date: Mon, 23 Sep 2024 15:19:52 +0200 Subject: [PATCH 1/4] feat(ci): add paths configuration to GitHub Actions for charts structure --- .github/workflows/release.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..50d14cb --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,34 @@ +jobs: + release: + permissions: + contents: write + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Configure Git + run: | + git config user.name "$GITHUB_ACTOR" + git config user.email "$GITHUB_ACTOR@users.noreply.github.com" + + - name: Lint Chart - Main chart + run: helm lint . + + - name: Update Dependencies + run: helm dependency update . + + - name: Run chart-releaser + uses: helm/chart-releaser-action@v1.6.0 + env: + CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + + - name: Deploy to GitHub Pages + run: | + git checkout gh-pages + helm repo index . --url https://.github.io/ + git add . + git commit -m "Update Helm repo index" + git push origin gh-pages From 8e2740de76f8ad02846dfd7da5ab0f893b3d3b00 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste DONNETTE Date: Mon, 23 Sep 2024 17:04:40 +0200 Subject: [PATCH 2/4] fix(ci): adjust lago-gh pages with correct endpoint --- .github/workflows/release.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 50d14cb..3825f0c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,3 +1,10 @@ +name: Release Charts + +on: + push: + branches: + - main + jobs: release: permissions: @@ -28,7 +35,7 @@ jobs: - name: Deploy to GitHub Pages run: | git checkout gh-pages - helm repo index . --url https://.github.io/ + helm repo index . --url https://getlago.github.io/lago-helm-charts git add . git commit -m "Update Helm repo index" git push origin gh-pages From 09993c766a073b50189d82c8dd330305525bac26 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste DONNETTE Date: Mon, 23 Sep 2024 17:11:48 +0200 Subject: [PATCH 3/4] fix(ci): adjust gh actions, release is required when we tag stuff --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3825f0c..8cb5020 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,8 +2,8 @@ name: Release Charts on: push: - branches: - - main + tags: + - "*.*.*" jobs: release: From cbac4b9e9c7260a4594c9772d6cfa0a8dc6b1a6d Mon Sep 17 00:00:00 2001 From: Jean-Baptiste DONNETTE Date: Tue, 24 Sep 2024 11:40:24 +0200 Subject: [PATCH 4/4] fix(ci): we will keep workflow_dispatch for the moment --- .github/workflows/release.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8cb5020..6a28c2e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,9 +1,12 @@ name: Release Charts on: - push: - tags: - - "*.*.*" + workflow_dispatch: + inputs: + tag: + description: 'Tag to release' + required: true + default: '1.0.0' jobs: release: @@ -37,5 +40,5 @@ jobs: git checkout gh-pages helm repo index . --url https://getlago.github.io/lago-helm-charts git add . - git commit -m "Update Helm repo index" + git commit -m "Update Helm repo index for tag ${{ github.event.inputs.tag }}" git push origin gh-pages