This repository provides GitHub reusable workflows to share between repositories.
The Helm hydration workflow implements the Helm GitOps hydration pattern. In this context, "hydration" refers to the process of rendering Helm charts into Kubernetes manifests before deployment. This allows you to validate your manifests as part of your CI/CD pipeline, ensuring that only fully rendered and tested resources are applied to your cluster.
Benefits:
- Enables pre-deployment validation and linting of Kubernetes manifests.
- Supports customization and templating of resources for different environments.
- Automates the rendering process, reducing manual errors.
When to use:
Use this workflow when you want to automate the rendering of Helm charts as part of your GitOps pipeline, especially
if you need to validate or modify manifests before deployment.
Inputs:
| Input | Description | Default | Required |
|---|---|---|---|
helm-version |
Helm CLI version to install, e.g. v3.17.0 |
latest |
No |
bundle-patches-in-one-pr |
Group all patch-level subchart updates into a single PR/branch instead of one PR per patch release | true |
No |
Required repository layout:
The calling repository must contain a helm-config.yaml file with the following structure:
releaseName: my-chart # required
namespace: my-namespace # required
environments:
dev:
apis:
- some.crd.io/v1/Resource
valueFiles:
- values-dev.yaml
prod:
apis:
- some.crd.io/v1/Resource
valueFiles:
- values-prod.yamlRequired permissions:
permissions:
contents: write
pull-requests: writeUsage example:
name: Helm hydration
on:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
jobs:
hydration:
uses: steadforce/steadops-workflows/.github/workflows/helm-hydration.yaml@mainHow it works:
- Reads the environment keys from
helm-config.yamland builds a parallel job matrix — one job per environment. - Reads the primary subchart version from
Chart.yaml(resolves YAML anchors). Ifbundle-patches-in-one-pristrue, the patch segment is replaced withx. - For each environment: installs Helm, resolves chart dependencies, runs
helm templatewith the environment-specific value files and API groups, and post-processes CRD manifests to inject ArgoCDServerSideApply=trueand sync-wave-1annotations. - Ensures the target
environments/<name>branch exists on origin (creates an orphan branch if not). - Opens or updates a pull request from
hydration-pull-request/<env>-<version>intoenvironments/<env>.
The helm unittest workflow bundles helm unittest and helm linting.
Inputs:
| Input | Description | Default | Required |
|---|---|---|---|
helm-version |
Helm CLI version to install, e.g. v3.19.0 |
latest |
No |
helm-unittest-version |
Helm unittest plugin version, e.g. 1.0.3 |
main (latest) |
No |
Required Secrets:
| Secret | Description | Required |
|---|---|---|
steadops-helm-renovation-ms-teams-webhook |
MS Teams webhook URL used for notifications on Renovate branches | Yes |
Usage example:
name: Helm unittest CI
on:
pull_request:
jobs:
unittest:
uses: steadforce/steadops-workflows/.github/workflows/helm-unittest.yaml@main
secrets:
steadops-helm-renovation-ms-teams-webhook: ${{ secrets.steadops-helm-renovation-ms-teams-webhook }}How it works:
- Installs the requested Helm version and the
helm-unittestplugin. - Runs
helm dependency updateto resolve chart dependencies. - Runs
helm unittestand publishes the JUnit test results to the GitHub Actions summary. - Runs
helm lintto validate the chart. - On Renovate branches (refs containing
renovate/), sends a success or failure notification to MS Teams.
Scans the repository for leaked secrets using Gitleaks before they reach the main branch.
Inputs:
| Input | Description | Default | Required |
|---|---|---|---|
gitleaks-ignore-path |
Path to the Gitleaks ignore file | .gitleaksignore |
No |
Usage example:
name: Secret scan
on:
pull_request:
push:
branches:
- main
jobs:
gitleaks:
uses: steadforce/steadops-workflows/.github/workflows/gitleaks.yaml@mainHow it works:
Checks out the full git history (fetch-depth: 0) and scans all commits with Gitleaks. Secrets matching patterns in the ignore file are excluded.
Scans commits for leaked secrets using Trufflehog OSS. Automatically determines the commit range from the pull request or push event context.
Inputs: None
Usage example:
name: Secret scan
on:
pull_request:
push:
branches:
- main
jobs:
trufflehog:
uses: steadforce/steadops-workflows/.github/workflows/trufflehog-oss.yaml@mainHow it works:
- Resolves the
base/headcommit range from the PR or push event. Falls back toHEAD~1if no valid base is available, and skips the scan if no range can be determined. - Runs Trufflehog over the resolved commit range.
- Publishes a results table to the GitHub Actions step summary.
- Fails the job if Trufflehog detects any secrets.