Skip to content

feat: docker swarm support #758

feat: docker swarm support

feat: docker swarm support #758

Workflow file for this run

name: Build helm chart
on:
push:
branches:
- 'main'
paths:
- deploy/charts/**
tags:
- '*'
pull_request:
workflow_dispatch:
inputs:
publish:
description: 'Publish the helm chart to ghcr.io'
type: boolean
default: false
jobs:
build-chart:
name: Build
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup helm
uses: azure/setup-helm@b9e51907a09c216f16ebe8536097933489208112 # v4.3.0
- name: Build helm chart
run: |
helm dependency build deploy/charts/distr
helm lint --strict deploy/charts/distr
helm package deploy/charts/distr
- name: Login to GitHub Container Registry (tag or manual only)
if: ${{ startsWith(github.ref, 'refs/tags/') || inputs.publish }}
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push helm chart to ghcr.io (tag or manual only)
if: ${{ startsWith(github.ref, 'refs/tags/') || inputs.publish }}
run: |
for chart in distr-*.tgz; do
helm push "$chart" oci://ghcr.io/glasskube/charts
done