From 4420dc82d6f569c54d5cd44dbda1983180aa87fa Mon Sep 17 00:00:00 2001 From: Christian Kotzbauer Date: Sat, 20 Jun 2020 09:35:35 +0200 Subject: [PATCH] add chart github-actions Signed-off-by: Christian Kotzbauer --- .github/ct.yaml | 6 ++++++ .github/workflows/chart-lint.yml | 32 +++++++++++++++++++++++++++++ .github/workflows/chart-release.yml | 16 +++++++++++++++ 3 files changed, 54 insertions(+) create mode 100644 .github/ct.yaml create mode 100644 .github/workflows/chart-lint.yml create mode 100644 .github/workflows/chart-release.yml diff --git a/.github/ct.yaml b/.github/ct.yaml new file mode 100644 index 0000000..cea6df5 --- /dev/null +++ b/.github/ct.yaml @@ -0,0 +1,6 @@ +# See https://github.com/helm/chart-testing#configuration +remote: origin +chart-dirs: + - charts +chart-repos: [] +helm-extra-args: --timeout 600s diff --git a/.github/workflows/chart-lint.yml b/.github/workflows/chart-lint.yml new file mode 100644 index 0000000..418a68f --- /dev/null +++ b/.github/workflows/chart-lint.yml @@ -0,0 +1,32 @@ +name: lint-chart + +on: + pull_request: + paths: + - "charts/**" + +jobs: + lint-test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: "0" + + - name: Run chart-testing (lint) + id: lint + uses: helm/chart-testing-action@v1.0.0-rc.2 + with: + command: lint + config: .github/ct.yaml + + - name: Create kind cluster + uses: helm/kind-action@v1.0.0-rc.1 + if: steps.lint.outputs.changed == 'true' + + - name: Run chart-testing (install) + uses: helm/chart-testing-action@v1.0.0-rc.2 + with: + command: install + config: .github/ct.yaml \ No newline at end of file diff --git a/.github/workflows/chart-release.yml b/.github/workflows/chart-release.yml new file mode 100644 index 0000000..ecc26ee --- /dev/null +++ b/.github/workflows/chart-release.yml @@ -0,0 +1,16 @@ +name: release-chart +on: + push: + tags: + - "*" + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Publish Helm chart + uses: stefanprodan/helm-gh-pages@master + with: + token: ${{ secrets.BOT_GITHUB_TOKEN }} + charts_dir: charts