aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/helm_ci.yaml51
-rw-r--r--.github/workflows/helm_release.yaml22
2 files changed, 73 insertions, 0 deletions
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