fix: add orga to K8S_NS generated name
This commit is contained in:
parent
eff7472739
commit
4c6d456a1c
1 changed files with 3 additions and 3 deletions
|
@ -1,14 +1,14 @@
|
||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
# shellcheck disable=SC1091
|
|
||||||
|
|
||||||
cd "$INPUT_WORKDIR"
|
cd "$INPUT_WORKDIR"
|
||||||
|
|
||||||
set -a
|
set -a
|
||||||
|
# shellcheck disable=SC1091
|
||||||
. ./.env
|
. ./.env
|
||||||
set +a
|
set +a
|
||||||
|
|
||||||
export K8S_NS;
|
export K8S_NS;
|
||||||
K8S_NS="$(printf '%s' "${GITHUB_REPOSITORY#*/}-$GITHUB_REF_NAME" \
|
K8S_NS="$(printf '%s' "${GITHUB_REPOSITORY//\//-}-$GITHUB_REF_NAME" \
|
||||||
| tr '[:upper:]' '[:lower:]' | tr -c '[:lower:][:digit:]-' - \
|
| tr '[:upper:]' '[:lower:]' | tr -c '[:lower:][:digit:]-' - \
|
||||||
| sed 's/-\+/-/g; s/^-\+//; s/-$//')"
|
| sed 's/-\+/-/g; s/^-\+//; s/-$//')"
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ kubectl config set-context --current --namespace="$K8S_NS"
|
||||||
if [ -n "$INPUT_REGISTRY_PASSWORD" ]; then
|
if [ -n "$INPUT_REGISTRY_PASSWORD" ]; then
|
||||||
kubectl get secret regcred \
|
kubectl get secret regcred \
|
||||||
|| kubectl create secret docker-registry regcred \
|
|| kubectl create secret docker-registry regcred \
|
||||||
--docker-server="${REGISTRY}" \
|
--docker-server="$REGISTRY" \
|
||||||
--docker-username="$INPUT_REGISTRY_USERNAME" \
|
--docker-username="$INPUT_REGISTRY_USERNAME" \
|
||||||
--docker-password="$INPUT_REGISTRY_PASSWORD"
|
--docker-password="$INPUT_REGISTRY_PASSWORD"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue