Another fix for the CICD
Some checks failed
CICD Start / Sanity and Base Decision (pull_request) Failing after 1m20s

Signed-off-by: copilotcoder <copilotcoder@darkhelm.org>
This commit is contained in:
copilotcoder
2026-05-28 15:26:42 -04:00
parent 07fb956793
commit c7ff9e657d
5 changed files with 113 additions and 39 deletions

View File

@@ -131,12 +131,24 @@ jobs:
REF_NAME: ${{ github.ref_name }}
run: |
set -e
API_BASE="${GITHUB_SERVER_URL%/}/api/v1"
REPO_OWNER="${REPO_FULL%/*}"
REPO_NAME="${REPO_FULL#*/}"
TARGET_REF="${HEAD_REF:-${REF_NAME}}"
./scripts/dispatch-workflow.sh \
--token "${PACKAGE_ACCESS_TOKEN}" \
--repo "${REPO_FULL}" \
--workflow "cicd-tests.yaml" \
--ref "${TARGET_REF}" \
--head-sha "${HEAD_SHA}" \
--source-workflow "CICD Checks"
payload=$(cat <<EOF
{
"ref": "${TARGET_REF}",
"inputs": {
"head_sha": "${HEAD_SHA}",
"source_workflow": "CICD Checks"
}
}
EOF
)
curl -fsS -X POST \
-H "Authorization: token ${PACKAGE_ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
"${API_BASE}/repos/${REPO_OWNER}/${REPO_NAME}/actions/workflows/cicd-tests.yaml/dispatches" \
-d "${payload}"

View File

@@ -125,11 +125,25 @@ jobs:
echo "head_sha=${GITHUB_SHA}" >> "$GITHUB_OUTPUT"
for i in 1 2 3; do
if timeout 30 docker manifest inspect "${BASE_REF_HASH}" >/dev/null 2>&1 && \
timeout 60 docker pull "${BASE_REF_HASH}" >/dev/null 2>&1; then
echo "Base availability check ${i}/3 for ${BASE_REF_HASH}"
if timeout 30 docker manifest inspect "${BASE_REF_HASH}" >/dev/null 2>&1; then
echo "manifest_check=ok"
else
echo "manifest_check=missing_or_unreachable"
if [ "${i}" -lt 3 ]; then
sleep 20
fi
continue
fi
if timeout 60 docker pull "${BASE_REF_HASH}" >/dev/null 2>&1; then
echo "pull_check=ok"
echo "Base rebuild needed: false"
echo "base_needed=false" >> "$GITHUB_OUTPUT"
exit 0
else
echo "pull_check=failed"
fi
if [ "${i}" -lt 3 ]; then
@@ -151,6 +165,9 @@ jobs:
REF_NAME: ${{ github.ref_name }}
run: |
set -e
API_BASE="${GITHUB_SERVER_URL%/}/api/v1"
REPO_OWNER="${REPO_FULL%/*}"
REPO_NAME="${REPO_FULL#*/}"
TARGET_REF="${HEAD_REF:-${REF_NAME}}"
if [ "${BASE_NEEDED}" = "true" ]; then
@@ -159,11 +176,20 @@ jobs:
TARGET_WORKFLOW="docker-build-main.yaml"
fi
./scripts/dispatch-workflow.sh \
--token "${PACKAGE_ACCESS_TOKEN}" \
--repo "${REPO_FULL}" \
--workflow "${TARGET_WORKFLOW}" \
--ref "${TARGET_REF}" \
--head-sha "${HEAD_SHA}" \
--source-workflow "CICD Start" \
--base-needed "${BASE_NEEDED}"
payload=$(cat <<EOF
{
"ref": "${TARGET_REF}",
"inputs": {
"head_sha": "${HEAD_SHA}",
"source_workflow": "CICD Start",
"base_needed": "${BASE_NEEDED}"
}
}
EOF
)
curl -fsS -X POST \
-H "Authorization: token ${PACKAGE_ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
"${API_BASE}/repos/${REPO_OWNER}/${REPO_NAME}/actions/workflows/${TARGET_WORKFLOW}/dispatches" \
-d "${payload}"

View File

@@ -31,12 +31,24 @@ jobs:
HEAD_SHA: ${{ github.sha }}
run: |
set -e
API_BASE="${GITHUB_SERVER_URL%/}/api/v1"
REPO_OWNER="${REPO_FULL%/*}"
REPO_NAME="${REPO_FULL#*/}"
TARGET_REF="${HEAD_REF:-${REF_NAME}}"
./scripts/dispatch-workflow.sh \
--token "${PACKAGE_ACCESS_TOKEN}" \
--repo "${REPO_FULL}" \
--workflow "cicd-start.yaml" \
--ref "${TARGET_REF}" \
--head-sha "${HEAD_SHA}" \
--source-workflow "CICD"
payload=$(cat <<EOF
{
"ref": "${TARGET_REF}",
"inputs": {
"head_sha": "${HEAD_SHA}",
"source_workflow": "CICD"
}
}
EOF
)
curl -fsS -X POST \
-H "Authorization: token ${PACKAGE_ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
"${API_BASE}/repos/${REPO_OWNER}/${REPO_NAME}/actions/workflows/cicd-start.yaml/dispatches" \
-d "${payload}"

View File

@@ -347,13 +347,25 @@ jobs:
REF_NAME: ${{ github.ref_name }}
run: |
set -e
API_BASE="${GITHUB_SERVER_URL%/}/api/v1"
REPO_OWNER="${REPO_FULL%/*}"
REPO_NAME="${REPO_FULL#*/}"
TARGET_REF="${HEAD_REF:-${REF_NAME}}"
./scripts/dispatch-workflow.sh \
--token "${PACKAGE_ACCESS_TOKEN}" \
--repo "${REPO_FULL}" \
--workflow "docker-build-main.yaml" \
--ref "${TARGET_REF}" \
--head-sha "${HEAD_SHA}" \
--source-workflow "CICD Base Image" \
--base-needed "true"
payload=$(cat <<EOF
{
"ref": "${TARGET_REF}",
"inputs": {
"head_sha": "${HEAD_SHA}",
"source_workflow": "CICD Base Image",
"base_needed": "true"
}
}
EOF
)
curl -fsS -X POST \
-H "Authorization: token ${PACKAGE_ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
"${API_BASE}/repos/${REPO_OWNER}/${REPO_NAME}/actions/workflows/docker-build-main.yaml/dispatches" \
-d "${payload}"

View File

@@ -163,12 +163,24 @@ jobs:
REF_NAME: ${{ github.ref_name }}
run: |
set -e
API_BASE="${GITHUB_SERVER_URL%/}/api/v1"
REPO_OWNER="${REPO_FULL%/*}"
REPO_NAME="${REPO_FULL#*/}"
TARGET_REF="${HEAD_REF:-${REF_NAME}}"
./scripts/dispatch-workflow.sh \
--token "${PACKAGE_ACCESS_TOKEN}" \
--repo "${REPO_FULL}" \
--workflow "cicd-checks.yaml" \
--ref "${TARGET_REF}" \
--head-sha "${HEAD_SHA}" \
--source-workflow "CICD Main Build"
payload=$(cat <<EOF
{
"ref": "${TARGET_REF}",
"inputs": {
"head_sha": "${HEAD_SHA}",
"source_workflow": "CICD Main Build"
}
}
EOF
)
curl -fsS -X POST \
-H "Authorization: token ${PACKAGE_ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
"${API_BASE}/repos/${REPO_OWNER}/${REPO_NAME}/actions/workflows/cicd-checks.yaml/dispatches" \
-d "${payload}"