Merge dev into main
Some checks failed
CI/CD Pipeline / Quality Gate (push) Successful in 21s
Deploy Customer Main / Build, Push, Deploy (push) Failing after 2m0s
CI/CD Pipeline / Build and Push Images (push) Successful in 8s
CI/CD Pipeline / Internal Notify (push) Has been cancelled
CI/CD Pipeline / Deploy Dev in Dokploy (push) Has been cancelled
Some checks failed
CI/CD Pipeline / Quality Gate (push) Successful in 21s
Deploy Customer Main / Build, Push, Deploy (push) Failing after 2m0s
CI/CD Pipeline / Build and Push Images (push) Successful in 8s
CI/CD Pipeline / Internal Notify (push) Has been cancelled
CI/CD Pipeline / Deploy Dev in Dokploy (push) Has been cancelled
Merge dev into main for customer deploy.
This commit was merged in pull request #27.
This commit is contained in:
@@ -50,14 +50,16 @@ jobs:
|
|||||||
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
|
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
|
||||||
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
|
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
|
||||||
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
|
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
|
||||||
|
GITEA_TOKEN: ${{ gitea.token }}
|
||||||
CUSTOMER_DEPLOY_SSH_KEY: ${{ secrets.CUSTOMER_DEPLOY_SSH_KEY }}
|
CUSTOMER_DEPLOY_SSH_KEY: ${{ secrets.CUSTOMER_DEPLOY_SSH_KEY }}
|
||||||
CUSTOMER_DEPLOY_SSH_KEY_B64: ${{ secrets.CUSTOMER_DEPLOY_SSH_KEY_B64 }}
|
CUSTOMER_DEPLOY_SSH_KEY_B64: ${{ secrets.CUSTOMER_DEPLOY_SSH_KEY_B64 }}
|
||||||
DEPLOY_SSH_KEY: ${{ secrets.DEPLOY_SSH_KEY }}
|
DEPLOY_SSH_KEY: ${{ secrets.DEPLOY_SSH_KEY }}
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
registry_user="${REGISTRY_USER:-${REGISTRY_USERNAME:-}}"
|
registry_user="${REGISTRY_USER:-${REGISTRY_USERNAME:-${GITHUB_ACTOR:-}}}"
|
||||||
registry_password="${REGISTRY_TOKEN:-${REGISTRY_PASSWORD:-}}"
|
registry_password="${REGISTRY_TOKEN:-${REGISTRY_PASSWORD:-${GITEA_TOKEN:-}}}"
|
||||||
|
home_dir="${HOME:-/root}"
|
||||||
|
|
||||||
if [ -z "${registry_user}" ]; then
|
if [ -z "${registry_user}" ]; then
|
||||||
echo "Missing registry user secret: set REGISTRY_USER or REGISTRY_USERNAME" >&2
|
echo "Missing registry user secret: set REGISTRY_USER or REGISTRY_USERNAME" >&2
|
||||||
@@ -70,7 +72,7 @@ jobs:
|
|||||||
if [ -z "${CUSTOMER_DEPLOY_SSH_KEY:-}" ] \
|
if [ -z "${CUSTOMER_DEPLOY_SSH_KEY:-}" ] \
|
||||||
&& [ -z "${CUSTOMER_DEPLOY_SSH_KEY_B64:-}" ] \
|
&& [ -z "${CUSTOMER_DEPLOY_SSH_KEY_B64:-}" ] \
|
||||||
&& [ -z "${DEPLOY_SSH_KEY:-}" ] \
|
&& [ -z "${DEPLOY_SSH_KEY:-}" ] \
|
||||||
&& [ ! -f "${HOME}/.ssh/ci-key" ] \
|
&& [ ! -f "${home_dir}/.ssh/ci-key" ] \
|
||||||
&& [ ! -f "/root/.ssh/ci-key" ]; then
|
&& [ ! -f "/root/.ssh/ci-key" ]; then
|
||||||
echo "Missing customer SSH key: set CUSTOMER_DEPLOY_SSH_KEY_B64, CUSTOMER_DEPLOY_SSH_KEY, DEPLOY_SSH_KEY, or install ~/.ssh/ci-key on the runner" >&2
|
echo "Missing customer SSH key: set CUSTOMER_DEPLOY_SSH_KEY_B64, CUSTOMER_DEPLOY_SSH_KEY, DEPLOY_SSH_KEY, or install ~/.ssh/ci-key on the runner" >&2
|
||||||
exit 1
|
exit 1
|
||||||
@@ -89,11 +91,12 @@ jobs:
|
|||||||
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
|
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
|
||||||
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
|
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
|
||||||
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
|
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
|
||||||
|
GITEA_TOKEN: ${{ gitea.token }}
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
registry_user="${REGISTRY_USER:-${REGISTRY_USERNAME:-}}"
|
registry_user="${REGISTRY_USER:-${REGISTRY_USERNAME:-${GITHUB_ACTOR:-}}}"
|
||||||
registry_password="${REGISTRY_TOKEN:-${REGISTRY_PASSWORD:-}}"
|
registry_password="${REGISTRY_TOKEN:-${REGISTRY_PASSWORD:-${GITEA_TOKEN:-}}}"
|
||||||
sha_short="$(printf '%s' "${GITHUB_SHA}" | cut -c1-12)"
|
sha_short="$(printf '%s' "${GITHUB_SHA}" | cut -c1-12)"
|
||||||
registry_path="${CUSTOMER_REGISTRY_HOST}/${CUSTOMER_REGISTRY_NAMESPACE}"
|
registry_path="${CUSTOMER_REGISTRY_HOST}/${CUSTOMER_REGISTRY_NAMESPACE}"
|
||||||
web_ref="${registry_path}/${CUSTOMER_WEB_IMAGE}"
|
web_ref="${registry_path}/${CUSTOMER_WEB_IMAGE}"
|
||||||
@@ -134,16 +137,17 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
mkdir -p "${HOME}/.ssh"
|
home_dir="${HOME:-/root}"
|
||||||
key_path="${HOME}/.ssh/customer_deploy_key"
|
mkdir -p "${home_dir}/.ssh"
|
||||||
|
key_path="${home_dir}/.ssh/customer_deploy_key"
|
||||||
if [ -n "${CUSTOMER_DEPLOY_SSH_KEY_B64:-}" ]; then
|
if [ -n "${CUSTOMER_DEPLOY_SSH_KEY_B64:-}" ]; then
|
||||||
printf '%s' "${CUSTOMER_DEPLOY_SSH_KEY_B64}" | base64 -d > "${key_path}"
|
printf '%s' "${CUSTOMER_DEPLOY_SSH_KEY_B64}" | base64 -d > "${key_path}"
|
||||||
elif [ -n "${DEPLOY_SSH_KEY:-}" ]; then
|
elif [ -n "${DEPLOY_SSH_KEY:-}" ]; then
|
||||||
printf '%s' "${DEPLOY_SSH_KEY}" | base64 -d > "${key_path}"
|
printf '%s' "${DEPLOY_SSH_KEY}" | base64 -d > "${key_path}"
|
||||||
elif [ -n "${CUSTOMER_DEPLOY_SSH_KEY:-}" ]; then
|
elif [ -n "${CUSTOMER_DEPLOY_SSH_KEY:-}" ]; then
|
||||||
printf '%s\n' "${CUSTOMER_DEPLOY_SSH_KEY}" > "${key_path}"
|
printf '%s\n' "${CUSTOMER_DEPLOY_SSH_KEY}" > "${key_path}"
|
||||||
elif [ -f "${HOME}/.ssh/ci-key" ]; then
|
elif [ -f "${home_dir}/.ssh/ci-key" ]; then
|
||||||
cp "${HOME}/.ssh/ci-key" "${key_path}"
|
cp "${home_dir}/.ssh/ci-key" "${key_path}"
|
||||||
else
|
else
|
||||||
cp "/root/.ssh/ci-key" "${key_path}"
|
cp "/root/.ssh/ci-key" "${key_path}"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user