feat: decouple hostname from action
All checks were successful
validate-shared-actions / validate-shared-actions (pull_request) Successful in 47s
Aikido Security PR Check / Aikido Security Scan (pull_request) Successful in 1m16s

Refs: ITDO-339
This commit is contained in:
Böhringer_Sebastian_-_J._Schmalz_GmbH 2026-06-01 11:06:31 +02:00
parent 7607756bf0
commit 452039b6fd
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 }}