From accc39f8f448a71adf86c76a3e3222ec6a94c609 Mon Sep 17 00:00:00 2001 From: David Hiendl Date: Fri, 23 Sep 2022 21:54:54 +0200 Subject: [PATCH] aded automatic chart build and publish, changed image to ghcr registry --- .github/workflows/helm_chart.yml | 34 +++++++++++++++++++ .../Chart.yaml | 0 .../DESIGN.md | 0 .../README.md | 0 .../files/register.sh | 0 .../hetzner-ubuntu-docker-fastinstall.sh | 0 .../templates/_helpers.tpl | 0 .../templates/config.yaml | 2 +- .../templates/deploy.yaml | 0 .../values.yaml | 2 +- 10 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/helm_chart.yml rename {chart => charts/gitlab-runner-hetzner-autoscale}/Chart.yaml (100%) rename {chart => charts/gitlab-runner-hetzner-autoscale}/DESIGN.md (100%) rename {chart => charts/gitlab-runner-hetzner-autoscale}/README.md (100%) rename {chart => charts/gitlab-runner-hetzner-autoscale}/files/register.sh (100%) rename {chart => charts/gitlab-runner-hetzner-autoscale}/install-scripts/hetzner-ubuntu-docker-fastinstall.sh (100%) rename {chart => charts/gitlab-runner-hetzner-autoscale}/templates/_helpers.tpl (100%) rename {chart => charts/gitlab-runner-hetzner-autoscale}/templates/config.yaml (93%) rename {chart => charts/gitlab-runner-hetzner-autoscale}/templates/deploy.yaml (100%) rename {chart => charts/gitlab-runner-hetzner-autoscale}/values.yaml (75%) diff --git a/.github/workflows/helm_chart.yml b/.github/workflows/helm_chart.yml new file mode 100644 index 0000000..086b181 --- /dev/null +++ b/.github/workflows/helm_chart.yml @@ -0,0 +1,34 @@ +name: Release Charts + +on: + push: + branches: + - master + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Configure Git + run: | + git config user.name "$GITHUB_ACTOR" + git config user.email "$GITHUB_ACTOR@users.noreply.github.com" + - name: Install Helm + uses: azure/setup-helm@v1 + with: + version: v3.8.1 + + - name: Add Helm dependency repos + run: | + helm repo update + - name: Run chart-releaser + uses: helm/chart-releaser-action@v1.4.0 + with: + charts_dir: charts + env: + CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" \ No newline at end of file diff --git a/chart/Chart.yaml b/charts/gitlab-runner-hetzner-autoscale/Chart.yaml similarity index 100% rename from chart/Chart.yaml rename to charts/gitlab-runner-hetzner-autoscale/Chart.yaml diff --git a/chart/DESIGN.md b/charts/gitlab-runner-hetzner-autoscale/DESIGN.md similarity index 100% rename from chart/DESIGN.md rename to charts/gitlab-runner-hetzner-autoscale/DESIGN.md diff --git a/chart/README.md b/charts/gitlab-runner-hetzner-autoscale/README.md similarity index 100% rename from chart/README.md rename to charts/gitlab-runner-hetzner-autoscale/README.md diff --git a/chart/files/register.sh b/charts/gitlab-runner-hetzner-autoscale/files/register.sh similarity index 100% rename from chart/files/register.sh rename to charts/gitlab-runner-hetzner-autoscale/files/register.sh diff --git a/chart/install-scripts/hetzner-ubuntu-docker-fastinstall.sh b/charts/gitlab-runner-hetzner-autoscale/install-scripts/hetzner-ubuntu-docker-fastinstall.sh similarity index 100% rename from chart/install-scripts/hetzner-ubuntu-docker-fastinstall.sh rename to charts/gitlab-runner-hetzner-autoscale/install-scripts/hetzner-ubuntu-docker-fastinstall.sh diff --git a/chart/templates/_helpers.tpl b/charts/gitlab-runner-hetzner-autoscale/templates/_helpers.tpl similarity index 100% rename from chart/templates/_helpers.tpl rename to charts/gitlab-runner-hetzner-autoscale/templates/_helpers.tpl diff --git a/chart/templates/config.yaml b/charts/gitlab-runner-hetzner-autoscale/templates/config.yaml similarity index 93% rename from chart/templates/config.yaml rename to charts/gitlab-runner-hetzner-autoscale/templates/config.yaml index a657ae3..7587530 100644 --- a/chart/templates/config.yaml +++ b/charts/gitlab-runner-hetzner-autoscale/templates/config.yaml @@ -72,7 +72,7 @@ stringData: # see for available versions: https://github.com/rancher/install-docker/tree/master/dist # "engine-install-url=https://releases.rancher.com/install-docker/19.03.15.sh" # "engine-install-url=https://s3.eu-central-1.wasabisys.com/dhswt-public/scripts/noop.sh" - "engine-install-url=https://s3.eu-central-1.wasabisys.com/dhswt-public/scripts/hetzner-ubuntu-docker-fastinstall.sh" + "engine-install-url=https://raw.githubusercontent.com/davidhiendl/gitlab-runner-hetzner-autoscale/master/chart/install-scripts/hetzner-ubuntu-docker-fastinstall.sh" ] OffPeakTimezone = "" OffPeakIdleCount = 0 diff --git a/chart/templates/deploy.yaml b/charts/gitlab-runner-hetzner-autoscale/templates/deploy.yaml similarity index 100% rename from chart/templates/deploy.yaml rename to charts/gitlab-runner-hetzner-autoscale/templates/deploy.yaml diff --git a/chart/values.yaml b/charts/gitlab-runner-hetzner-autoscale/values.yaml similarity index 75% rename from chart/values.yaml rename to charts/gitlab-runner-hetzner-autoscale/values.yaml index d891161..be9eba7 100644 --- a/chart/values.yaml +++ b/charts/gitlab-runner-hetzner-autoscale/values.yaml @@ -1,4 +1,4 @@ -image: mawalu/hetzner-gitlab-runner:latest +image: ghcr.io/davidhiendl/gitlab-runner-hetzner-autoscale:master pullPolicy: Always registrationToken: "" ciServerUrl: "https://gitlab.com/"