Fix Action
Some checks failed
Deploy KubeViz / deploy (push) Has been cancelled

This commit is contained in:
2026-03-01 08:07:07 +01:00
parent 84d43fc807
commit c644517e36
2 changed files with 18 additions and 3 deletions

View File

@@ -14,11 +14,25 @@ jobs:
IMAGE_TAG: prod
SERVICE_NAME: kubeviz.service
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Checkout (git, no Node runtime required)
env:
CI_REPO_TOKEN: ${{ secrets.CI_REPO_TOKEN }}
run: |
set -euo pipefail
repo_url="${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git"
if [ -n "${CI_REPO_TOKEN:-}" ]; then
proto="$(printf '%s' "${GITHUB_SERVER_URL}" | sed -E 's#(https?://).*#\1#')"
host="$(printf '%s' "${GITHUB_SERVER_URL}" | sed -E 's#https?://##')"
repo_url="${proto}${GITHUB_ACTOR}:${CI_REPO_TOKEN}@${host}/${GITHUB_REPOSITORY}.git"
fi
rm -rf "${GITHUB_WORKSPACE}"
mkdir -p "${GITHUB_WORKSPACE}"
git clone --depth 1 --no-tags "${repo_url}" "${GITHUB_WORKSPACE}"
cd "${GITHUB_WORKSPACE}"
git fetch --depth 1 origin "${GITHUB_SHA}"
git checkout --detach "${GITHUB_SHA}"
- name: Build and deploy via Podman + Quadlet service
run: |
chmod +x scripts/deploy-with-podman.sh
scripts/deploy-with-podman.sh

View File

@@ -71,6 +71,7 @@ Workflow template is included at:
- `scripts/deploy-with-podman.sh`
The deploy script builds with Podman, tags `localhost/kubeviz:prod`, and restarts `kubeviz.service`.
The workflow uses `git` checkout (no Node runtime dependency). For private repos, set Gitea secret `CI_REPO_TOKEN`.
Required sudo permissions for the Gitea runner user (example):