diff --git a/.gitea/workflows/ci-cd.yml b/.gitea/workflows/ci-cd.yml index f4e4805..5349b80 100644 --- a/.gitea/workflows/ci-cd.yml +++ b/.gitea/workflows/ci-cd.yml @@ -168,6 +168,11 @@ jobs: REGISTRY_PASSWORD: ${{ secrets.REGISTRY_TOKEN }} run: | set -euo pipefail + if [ -z "${REGISTRY_USER:-}" ] || [ -z "${REGISTRY_PASSWORD:-}" ]; then + echo "Registry credentials are not configured; skipping image push." + exit 0 + fi + curl -sL https://github.com/google/go-containerregistry/releases/download/v0.19.0/go-containerregistry_Linux_x86_64.tar.gz | tar xz crane chmod +x crane @@ -218,6 +223,11 @@ jobs: REGISTRY_PASSWORD: ${{ secrets.REGISTRY_TOKEN }} run: | set -euo pipefail + if [ -z "${DEPLOY_HOST:-}" ] || [ -z "${DEPLOY_USER:-}" ] || [ -z "${DEPLOY_SSH_KEY:-}" ] || [ -z "${REGISTRY_USER:-}" ] || [ -z "${REGISTRY_PASSWORD:-}" ]; then + echo "Deploy credentials are not configured; skipping deploy." + exit 0 + fi + BRANCH_TAG=$(echo "${GITHUB_REF_NAME}" | sed 's/\//-/g') mkdir -p ~/.ssh