From 3e4a7058d2f550b52eee358a9f05d6bf283bb88b Mon Sep 17 00:00:00 2001 From: lebaudantoine Date: Fri, 3 Jan 2025 19:32:48 +0100 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F(ci)=20merge=20helmfile-lint?= =?UTF-8?q?=20and=20release=20chart=20workflows?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Merge both flows related to the Helmfile. Also, make sure lint job is run before the release one. --- .github/workflows/helmfile-linter.yml | 22 ---------------------- .github/workflows/release-helm-chart.yaml | 22 +++++++++++++++++++--- 2 files changed, 19 insertions(+), 25 deletions(-) delete mode 100644 .github/workflows/helmfile-linter.yml diff --git a/.github/workflows/helmfile-linter.yml b/.github/workflows/helmfile-linter.yml deleted file mode 100644 index d6b37b34..00000000 --- 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: "meet,secrets" diff --git a/.github/workflows/release-helm-chart.yaml b/.github/workflows/release-helm-chart.yaml index 9ded4246..be97ea7a 100644 --- a/.github/workflows/release-helm-chart.yaml +++ b/.github/workflows/release-helm-chart.yaml @@ -2,14 +2,30 @@ name: Release Chart run-name: Release Chart on: + pull_request: + branches: + - 'main' push: paths: - - src/helm/meet/** + - ./src/helm/meet/** jobs: + lint-helmfile: + 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: "meet,secrets" + release: - # depending on default permission settings for your org (contents being read-only or read-write for workloads), you will have to add permissions - # see: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token + needs: helmfile-lint + if: github.event_name == 'push' permissions: contents: write runs-on: ubuntu-latest