From 8677320901042ae0690173ac78efc60855196ce7 Mon Sep 17 00:00:00 2001 From: Jacques ROUSSEL Date: Thu, 9 Jan 2025 18:03:41 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7(helm)=20add=20CI=20for=20publishin?= =?UTF-8?q?g=20Helm=20charts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We need to publish a Helm chart to facilitate separating the code from the deployment configuration. --- .github/workflows/helmfile-linter.yml | 22 ---------------- .github/workflows/release-helmchart.yml | 34 +++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 22 deletions(-) delete mode 100644 .github/workflows/helmfile-linter.yml create mode 100644 .github/workflows/release-helmchart.yml diff --git a/.github/workflows/helmfile-linter.yml b/.github/workflows/helmfile-linter.yml deleted file mode 100644 index 775efcaad..000000000 --- a/.github/workflows/helmfile-linter.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Helmfile lint -run-name: Helmfile lint - -on: - pull_request: - branches: - - 'main' - -jobs: - helmfile-lint: - runs-on: ubuntu-latest - container: - image: ghcr.io/helmfile/helmfile:latest - steps: - - - uses: numerique-gouv/action-helmfile-lint@main - with: - app-id: ${{ secrets.APP_ID }} - age-key: ${{ secrets.SOPS_PRIVATE }} - private-key: ${{ secrets.PRIVATE_KEY }} - helmfile-src: "src/helm" - repositories: "people,secrets" diff --git a/.github/workflows/release-helmchart.yml b/.github/workflows/release-helmchart.yml new file mode 100644 index 000000000..49ece16ab --- /dev/null +++ b/.github/workflows/release-helmchart.yml @@ -0,0 +1,34 @@ +name: Release Chart +run-name: Release Chart + +on: + pull_request: + push: + paths: + - ./src/helm/desk/** + +jobs: + release: + permissions: + contents: write + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Cleanup + run: rm -rf ./src/helm/extra + + - name: Install Helm + uses: azure/setup-helm@v4 + env: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + + - name: Publish Helm charts + uses: numerique-gouv/helm-gh-pages@add-overwrite-option + with: + charts_dir: ./src/helm + linting: on + token: ${{ secrets.GITHUB_TOKEN }}