Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions publish-helm-chart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,17 @@ It needs the `id-token: write` permission to be able to sign the Helm chart with

### Inputs

| Input | Required | Description |
| ------------------------- | -------- | --------------------------------------------------------------- |
| `chart-registry-uri` | Yes | The URI of the Helm Chart registry |
| `chart-registry-username` | Yes | The username used to login to the Helm Chart registry |
| `chart-registry-password` | Yes | The password used to login to the Helm Chart registry |
| `chart-repository` | Yes | Path to the Helm chart, for example `sdp-charts/kafka-operator` |
| `chart-directory` | Yes | The directory where the Chart.yaml file is located |
| `chart-version` | Yes | The Helm Chart version |
| `app-version` | Yes | The app version to set in the Helm Chart |
| `helm-version` | No | The version of helm |
| Input | Required | Description |
| ------------------------- | -------- | ----------------------------------------------------------------- |
| `chart-registry-uri` | Yes | The URI of the Helm Chart registry |
| `chart-registry-username` | Yes | The username used to login to the Helm Chart registry |
| `chart-registry-password` | Yes | The password used to login to the Helm Chart registry |
| `chart-repository` | Yes | Path to the Helm chart, for example `sdp-charts/kafka-operator` |
| `chart-directory` | Yes | The directory where the Chart.yaml file is located |
| `chart-version` | Yes | The Helm Chart version |
| `app-version` | Yes | The app version to set in the Helm Chart |
| `helm-version` | No | The version of helm |
| `publish-and-sign` | No | Whether to publish and sign the Helm Chart. `"true"` or `"false"` |

### Outputs

Expand Down
7 changes: 7 additions & 0 deletions publish-helm-chart/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ inputs:
SUFFIX may be 's' for seconds (the default), 'm' for minutes, 'h' for hours or 'd' for days.
See `sleep --help` for the full details.
default: "30s"
publish-and-sign:
description: Whether to publish and sign the packaged Helm Chart. Can be "true" or "false"
default: "true"
runs:
using: composite
steps:
Expand All @@ -51,6 +54,7 @@ runs:
run: "$GITHUB_ACTION_PATH/../.scripts/actions/install_helm.sh"

- name: Log into Container Registry (${{ inputs.chart-registry-uri }}) using Helm
if: inputs.publish-and-sign == 'true'
env:
CHART_REGISTRY_USERNAME: ${{ inputs.chart-registry-username }}
CHART_REGISTRY_PASSWORD: ${{ inputs.chart-registry-password }}
Expand All @@ -64,6 +68,7 @@ runs:
helm registry login --username "$CHART_REGISTRY_USERNAME" --password "$CHART_REGISTRY_PASSWORD" "$CHART_REGISTRY_URI"

- name: Log into Container Registry (${{ inputs.chart-registry-uri }}) using Docker
if: inputs.publish-and-sign == 'true'
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
with:
registry: ${{ inputs.chart-registry-uri }}
Expand Down Expand Up @@ -97,6 +102,7 @@ runs:
"$CHART_DIRECTORY"

- name: Publish Helm Chart
if: inputs.publish-and-sign == 'true'
env:
CHART_REGISTRY_URI: ${{ inputs.chart-registry-uri }}
CHART_REPOSITORY: ${{ inputs.chart-repository }}
Expand Down Expand Up @@ -128,6 +134,7 @@ runs:
echo "CHART_DIGEST=$CHART_DIGEST" | tee -a "$GITHUB_ENV"

- name: Sign Helm Chart
if: inputs.publish-and-sign == 'true'
env:
RETRY_TIMEOUT: ${{ inputs.cosign-retry-timeout }}
RETRY_COUNT: ${{ inputs.cosign-retries }}
Expand Down