From 61251d5f3890ef5de28d4bd18e332ff0b5b55f72 Mon Sep 17 00:00:00 2001 From: copilotcoder Date: Thu, 28 May 2026 14:56:54 -0400 Subject: [PATCH] Trying to unstickify the cicd from failing. Signed-off-by: copilotcoder --- .gitea/workflows/cicd-start.yaml | 30 ------------------------------ scripts/dispatch-workflow.sh | 8 +++++++- 2 files changed, 7 insertions(+), 31 deletions(-) diff --git a/.gitea/workflows/cicd-start.yaml b/.gitea/workflows/cicd-start.yaml index ee4933d..cbbc105 100644 --- a/.gitea/workflows/cicd-start.yaml +++ b/.gitea/workflows/cicd-start.yaml @@ -80,38 +80,8 @@ jobs: - name: Compute base hash and base-needed signal id: base-decision - env: - PACKAGE_ACCESS_TOKEN: ${{ secrets.PACKAGE_ACCESS_TOKEN }} - REPO_FULL: ${{ github.repository }} run: | set -e - - API_BASE="http://kankali.darkhelm.lan:3000/api/v1" - REPO_OWNER="${REPO_FULL%/*}" - REPO_NAME="${REPO_FULL#*/}" - - if [ -z "${PACKAGE_ACCESS_TOKEN}" ]; then - echo "❌ PACKAGE_ACCESS_TOKEN is empty" - exit 1 - fi - - mkdir -p scripts - - curl -fsS \ - -H "Authorization: token ${PACKAGE_ACCESS_TOKEN}" \ - "${API_BASE}/repos/${REPO_OWNER}/${REPO_NAME}/raw/Dockerfile.cicd-base?ref=${GITHUB_SHA}" \ - -o Dockerfile.cicd-base - - curl -fsS \ - -H "Authorization: token ${PACKAGE_ACCESS_TOKEN}" \ - "${API_BASE}/repos/${REPO_OWNER}/${REPO_NAME}/raw/.dockerignore?ref=${GITHUB_SHA}" \ - -o .dockerignore - - curl -fsS \ - -H "Authorization: token ${PACKAGE_ACCESS_TOKEN}" \ - "${API_BASE}/repos/${REPO_OWNER}/${REPO_NAME}/raw/scripts/compute-cicd-base-hash.sh?ref=${GITHUB_SHA}" \ - -o scripts/compute-cicd-base-hash.sh - chmod +x scripts/compute-cicd-base-hash.sh BASE_HASH=$(./scripts/compute-cicd-base-hash.sh) diff --git a/scripts/dispatch-workflow.sh b/scripts/dispatch-workflow.sh index 3f30632..8949138 100755 --- a/scripts/dispatch-workflow.sh +++ b/scripts/dispatch-workflow.sh @@ -1,7 +1,13 @@ #!/usr/bin/env bash set -euo pipefail -API_BASE="http://kankali.darkhelm.lan:3000/api/v1" +if [[ -n "${GITHUB_SERVER_URL:-}" ]]; then + API_BASE="${GITHUB_SERVER_URL%/}/api/v1" +elif [[ -n "${GITEA_SERVER_URL:-}" ]]; then + API_BASE="${GITEA_SERVER_URL%/}/api/v1" +else + API_BASE="http://kankali.darkhelm.lan:3000/api/v1" +fi TOKEN="" REPO_FULL="" WORKFLOW_FILE=""