This repository includes automated workflows for distributing the DevGuard Helm chart to both GitHub and GitLab package registries.
The GitHub Actions workflow (.github/workflows/helm-release.yml) automatically:
- Triggers on: Git tags starting with
v(e.g.,v0.15.3) or manual workflow dispatch - Packages: The Helm chart with the specified version
- Publishes: To GitHub Container Registry (
ghcr.io) - Creates: GitHub releases with chart artifacts
-
Automatic release (recommended):
git tag v0.15.4 git push origin v0.15.4
-
Manual release:
- Go to Actions tab in GitHub
- Select "Release Helm Chart" workflow
- Click "Run workflow" and specify version
# Add the repository
helm repo add devguard oci://ghcr.io/your-username
# Install the chart
helm install my-devguard oci://ghcr.io/your-username/devguard --version 0.15.3
# Or pull the chart
helm pull oci://ghcr.io/your-username/devguard --version 0.15.3The GitLab CI configuration (.gitlab-ci.yml) automatically:
- Triggers on: Git tags starting with
vor manual pipeline runs - Lints: Chart on merge requests and main branch
- Packages: The Helm chart with the specified version
- Publishes: To GitLab Container Registry
- Creates: GitLab releases (optional, requires
GITLAB_TOKEN)
For GitLab releases (optional), add a project access token:
- Go to Project Settings → Access Tokens
- Create token with
apiscope - Add as CI/CD variable named
GITLAB_TOKEN
-
Automatic release:
git tag v0.15.4 git push origin v0.15.4
-
Manual release:
- Go to CI/CD → Pipelines
- Click "Run pipeline"
- The
helm-releasejob can be triggered manually
# Login to GitLab registry (if private)
helm registry login registry.gitlab.com --username your-username
# Install the chart
helm install my-devguard oci://registry.gitlab.com/your-group/devguard-helm-chart/devguard --version 0.15.3
# Or pull the chart
helm pull oci://registry.gitlab.com/your-group/devguard-helm-chart/devguard --version 0.15.3Both workflows automatically:
- Extract version from Git tags (removing the
vprefix) - Update
Chart.yamlwith the correct version and appVersion - Package the chart with the proper version
- Uses
GITHUB_TOKEN(automatically provided) - Requires
packages: writepermission (included in workflow)
- Uses
CI_REGISTRY_USERandCI_REGISTRY_PASSWORD(automatically provided) - Works with GitLab Container Registry by default
The workflows expect the standard Helm chart structure:
Chart.yaml # Chart metadata
values.yaml # Default values
templates/ # Kubernetes templates
_helpers.tpl # Template helpers
...
- Authentication failures: Ensure proper permissions are set for the repository
- Version conflicts: Make sure tag versions match semantic versioning (e.g.,
v1.2.3) - Registry limits: Check registry storage limits if uploads fail
# Lint the chart
helm lint .
# Test template rendering
helm template test-release . --debug --dry-run
# Package locally
helm package .