From 3d040574582412f254b117a8c6d4d75993a89f47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gon=C3=A7alo=20Heleno?= Date: Wed, 19 Jul 2023 10:51:57 +0200 Subject: [PATCH] ci: add workflow to auto-update charts --- .github/workflows/chart-update.yaml | 46 +++++++++++++++++++++++++++++ README.adoc | 2 +- charts/longhorn/Chart.yaml | 2 +- 3 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/chart-update.yaml diff --git a/.github/workflows/chart-update.yaml b/.github/workflows/chart-update.yaml new file mode 100644 index 0000000..2096c6e --- /dev/null +++ b/.github/workflows/chart-update.yaml @@ -0,0 +1,46 @@ +--- +name: "chart-update" + +on: + schedule: + - cron: "0 7 * * 1-5" + + workflow_dispatch: + inputs: + update-strategy: + description: "Update strategy to use. Valid values are 'patch', 'minor' or 'major'" + type: choice + options: + - "patch" + - "minor" + - "major" + required: true + excluded-dependencies: + description: "Comma-separated list of dependencies to exclude from the update (i.e. 'dependency1,dependency2,dependency3')" + type: string + required: false + default: "" + dry-run: + description: "Activate dry-run mode" + type: boolean + required: false + default: true + +jobs: + + chart-update-schedule: + if: ${{ github.event_name == 'schedule' }} + strategy: + matrix: + update-strategy: ["major", "minor"] + uses: camptocamp/devops-stack/.github/workflows/modules-chart-update.yaml@main + with: + update-strategy: ${{ matrix.update-strategy }} + + chart-update-manual: + if: ${{ github.event_name == 'workflow_dispatch' }} + uses: camptocamp/devops-stack/.github/workflows/modules-chart-update.yaml@main + with: + update-strategy: ${{ inputs.update-strategy }} + excluded-dependencies: ${{ inputs.excluded-dependencies }} + dry-run: ${{ inputs.dry-run }} diff --git a/README.adoc b/README.adoc index 4806774..d26b93a 100644 --- a/README.adoc +++ b/README.adoc @@ -1,6 +1,6 @@ = devops-stack-module-longhorn // Document attributes to replace along the document -:chart-version: 1.4.2 +:longhorn-chart-version: 1.4.2 :original-repo-url: https://github.com/longhorn/longhorn A https://devops-stack.io[DevOps Stack] module to deploy and configure https://longhorn.io/[Longhorn]. diff --git a/charts/longhorn/Chart.yaml b/charts/longhorn/Chart.yaml index a741b7f..60ee001 100644 --- a/charts/longhorn/Chart.yaml +++ b/charts/longhorn/Chart.yaml @@ -4,5 +4,5 @@ name: "longhorn" version: "0" dependencies: - name: "longhorn" - version: "^1" + version: "1.4.2" repository: "https://charts.longhorn.io"