Merge pull request 'feat: decouple hostname from action' (#37) from feature/ITDO-339 into main

Reviewed-on: #37
Reviewed-by: Kraft_Ruben_-_J._Schmalz_GmbH <Ruben.Kraft@schmalz.de>
This commit is contained in:
Böhringer_Sebastian_-_J._Schmalz_GmbH 2026-06-01 12:35:51 +00:00
commit 03b9e01225
Signed by: schmalz-git.git.onstackit.cloud
GPG key ID: 569DFBE669A0D544
2 changed files with 17 additions and 5 deletions

View file

@ -7,7 +7,7 @@ Deploy a service to Kubernetes via Helm over SSH.
| Input | Required | Default | Description |
|-------|----------|---------|-------------|
| `service-name` | Yes | — | Helm release name |
| `helm-host` | Yes | — | SSH target host (e.g. `dsp1-stage.schmalzgroup.net`) |
| `helm-cluster` | Yes | — | Cluster to deploye to (one of `internal_stage` or `internal_prod`) |
| `image-tag` | Yes | — | Docker image tag to deploy |
| `ssh-key` | Yes | — | Private SSH key content |
| `overrides-file` | No | `kubernetes/overrides-pu.yaml` | Local path to Helm values override file |

View file

@ -5,8 +5,8 @@ inputs:
service-name:
description: Helm release name
required: true
helm-host:
description: SSH target (e.g., dsp1-stage.schmalzgroup.net)
helm-cluster:
description: Name of the target Kubernetes cluster to deploy to
required: true
overrides-file:
description: Local path to Helm values override file
@ -45,10 +45,22 @@ runs:
chmod 600 "$SSH_KEY_FILE"
echo "SSH_KEY_FILE=$SSH_KEY_FILE" >> "$GITHUB_ENV"
- name: Map cluster name to target host
id: map-host
shell: bash
env:
HELM_CLUSTER: ${{ inputs.helm-cluster }}
run: |
case "$HELM_CLUSTER" in
internal_stage) echo "host=dsp1-stage.schmalzgroup.net" ;;
internal_prod) echo "host=dsp1.schmalzgroup.net" ;;
*) echo "Invalid cluster '$HELM_CLUSTER'. Must be 'internal_stage' or 'internal_prod'." && exit 1 ;;
esac >> "$GITHUB_OUTPUT"
- name: Copy overrides file
shell: bash
env:
HELM_HOST: ${{ inputs.helm-host }}
HELM_HOST: ${{ steps.map-host.outputs.host }}
SERVICE_NAME: ${{ inputs.service-name }}
OVERRIDES_FILE: ${{ inputs.overrides-file }}
run: |
@ -63,7 +75,7 @@ runs:
- name: Helm deploy
shell: bash
env:
HELM_HOST: ${{ inputs.helm-host }}
HELM_HOST: ${{ steps.map-host.outputs.host }}
SERVICE_NAME: ${{ inputs.service-name }}
NAMESPACE: ${{ inputs.namespace }}
HELM_REPO: ${{ inputs.helm-repo }}