From 31fc935e0a82c53a197dd1517e8e43b4fbd76399 Mon Sep 17 00:00:00 2001 From: ange Date: Thu, 2 May 2024 17:27:39 +0200 Subject: [PATCH] feat: simplify variables --- action.yaml | 2 -- k8sdeploy.sh | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/action.yaml b/action.yaml index 97195cb..03caae3 100644 --- a/action.yaml +++ b/action.yaml @@ -14,8 +14,6 @@ runs: - name: k8sdeploy run: ${{ gitea.action_path }}/k8sdeploy.sh env: - ACTION_REPO: ${{ gitea.repository }} - ACTION_REF_NAME: ${{ gitea.ref_name }} ACTION_KUBECONFIG: ${{ inputs.kubeconfig }} ACTION_REGISTRY_USERNAME: ${{ inputs.registry_username }} ACTION_REGISTRY_PASSWORD: ${{ inputs.registry_password }} diff --git a/k8sdeploy.sh b/k8sdeploy.sh index 4129937..9532657 100755 --- a/k8sdeploy.sh +++ b/k8sdeploy.sh @@ -6,7 +6,7 @@ set -a set +a REGISTRY="${IMAGEAPP%%/*}" -NS="${ACTION_REPO#*/}-${ACTION_REF_NAME}" +NS="${GITHUB_REPOSITORY#*/}-${GITHUB_REF_NAME}" mkdir -p "$HOME/.kube/" echo "$ACTION_KUBECONFIG" > "$HOME/.kube/config" @@ -21,7 +21,7 @@ if [ -n "$ACTION_REGISTRY_PASSWORD" ]; then --docker-password="$ACTION_REGISTRY_PASSWORD" fi -if [ "$ACTION_REF_NAME" == prod ] || [ "$ACTION_REF_NAME" == staging ]; then +if [ "$GITHUB_REF_NAME" == prod ] || [ "$GITHUB_REF_NAME" == staging ]; then ./manifests/bin/prod.sh else ./manifests/bin/devel.sh