From d06da0294bb7d0321e89919ff92b8fddd4fc4475 Mon Sep 17 00:00:00 2001 From: Jackbennett Date: Tue, 14 Mar 2023 10:37:00 +0000 Subject: Use helm YAML from seaweedfs repo --- .github/workflows/helm_ci.yaml | 51 +++++++++++++++++++++++++++++++++++++ .github/workflows/helm_release.yaml | 22 ++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100644 .github/workflows/helm_ci.yaml create mode 100644 .github/workflows/helm_release.yaml (limited to '.github/workflows') diff --git a/.github/workflows/helm_ci.yaml b/.github/workflows/helm_ci.yaml new file mode 100644 index 0000000..523f42a --- /dev/null +++ b/.github/workflows/helm_ci.yaml @@ -0,0 +1,51 @@ +name: "helm: lint and test charts" + +on: + push: + branches: [ master ] + paths: ['deploy/helm/seaweedfs-csi-driver/**'] + pull_request: + branches: [ master ] + paths: ['deploy/helm/seaweedfs-csi-driver/**'] + +permissions: + contents: read + +jobs: + lint-test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Set up Helm + uses: azure/setup-helm@v3 + with: + version: v3.10.0 + + - uses: actions/setup-python@v4 + with: + python-version: '3.9' + check-latest: true + + - name: Set up chart-testing + uses: helm/chart-testing-action@v2.3.1 + + - name: Run chart-testing (list-changed) + id: list-changed + run: | + changed=$(ct list-changed --chart-dirs deploy/helm/seaweedfs-csi-driver/) + if [[ -n "$changed" ]]; then + echo "::set-output name=changed::true" + fi + + - name: Run chart-testing (lint) + run: ct lint --all --validate-maintainers=false --chart-dirs deploy/helm/seaweedfs-csi-driver/ + + - name: Create kind cluster + uses: helm/kind-action@v1.5.0 + + - name: Run chart-testing (install) + run: ct install --all --chart-dirs deploy/helm/seaweedfs-csi-driver/ diff --git a/.github/workflows/helm_release.yaml b/.github/workflows/helm_release.yaml new file mode 100644 index 0000000..67dbe66 --- /dev/null +++ b/.github/workflows/helm_release.yaml @@ -0,0 +1,22 @@ +name: "helm: publish charts" +on: + push: + tags: + - '*' + +permissions: + contents: write + pages: write + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Publish Helm charts + uses: stefanprodan/helm-gh-pages@master + with: + token: ${{ secrets.GITHUB_TOKEN }} + charts_dir: deploy/helm/ + target_dir: helm + branch: gh-pages -- cgit v1.2.3