More CICD fixes again again
Some checks failed
CICD Start / Sanity and Base Decision (pull_request) Failing after 11s
Some checks failed
CICD Start / Sanity and Base Decision (pull_request) Failing after 11s
Signed-off-by: copilotcoder <copilotcoder@darkhelm.org>
This commit is contained in:
@@ -22,7 +22,8 @@ concurrency:
|
|||||||
jobs:
|
jobs:
|
||||||
sanity-and-routing:
|
sanity-and-routing:
|
||||||
name: Sanity and Base Decision
|
name: Sanity and Base Decision
|
||||||
runs-on: ubuntu-act
|
# Keep startup lightweight to avoid runner image setup stalls.
|
||||||
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
base_needed: ${{ steps.base-decision.outputs.base_needed }}
|
base_needed: ${{ steps.base-decision.outputs.base_needed }}
|
||||||
head_sha: ${{ steps.base-decision.outputs.head_sha }}
|
head_sha: ${{ steps.base-decision.outputs.head_sha }}
|
||||||
@@ -54,31 +55,6 @@ jobs:
|
|||||||
echo "${GITEA_REGISTRY_IP} ${GITEA_REGISTRY_HOST}" >> /etc/hosts
|
echo "${GITEA_REGISTRY_IP} ${GITEA_REGISTRY_HOST}" >> /etc/hosts
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Registry sanity login
|
|
||||||
env:
|
|
||||||
PACKAGE_ACCESS_TOKEN: ${{ secrets.PACKAGE_ACCESS_TOKEN }}
|
|
||||||
REGISTRY_USER: ${{ github.actor }}
|
|
||||||
run: |
|
|
||||||
echo "${PACKAGE_ACCESS_TOKEN}" | docker login "http://${GITEA_REGISTRY}" -u "${REGISTRY_USER}" --password-stdin
|
|
||||||
|
|
||||||
- name: Registry sanity push and pull
|
|
||||||
env:
|
|
||||||
REGISTRY_USER: ${{ github.actor }}
|
|
||||||
run: |
|
|
||||||
PREFLIGHT_TAG="${GITHUB_SHA:-manual}"
|
|
||||||
PREFLIGHT_REF="${GITEA_REGISTRY}/darkhelm.org/plex-playlist-ci-preflight:${PREFLIGHT_TAG}"
|
|
||||||
|
|
||||||
cat <<'EOF' > /tmp/Dockerfile.preflight
|
|
||||||
FROM scratch
|
|
||||||
LABEL org.opencontainers.image.title="plex-playlist registry preflight"
|
|
||||||
LABEL org.opencontainers.image.description="Minimal image used to verify registry push/pull access"
|
|
||||||
EOF
|
|
||||||
|
|
||||||
docker build -f /tmp/Dockerfile.preflight -t registry-preflight:latest /tmp
|
|
||||||
docker tag registry-preflight:latest "${PREFLIGHT_REF}"
|
|
||||||
docker push "${PREFLIGHT_REF}"
|
|
||||||
docker pull "${PREFLIGHT_REF}"
|
|
||||||
|
|
||||||
- name: Compute base hash and base-needed signal
|
- name: Compute base hash and base-needed signal
|
||||||
id: base-decision
|
id: base-decision
|
||||||
env:
|
env:
|
||||||
@@ -127,32 +103,9 @@ jobs:
|
|||||||
|
|
||||||
echo "head_sha=${GITHUB_SHA}" >> "$GITHUB_OUTPUT"
|
echo "head_sha=${GITHUB_SHA}" >> "$GITHUB_OUTPUT"
|
||||||
echo "base_hash=${BASE_HASH}" >> "$GITHUB_OUTPUT"
|
echo "base_hash=${BASE_HASH}" >> "$GITHUB_OUTPUT"
|
||||||
|
# Route through docker-build-base always; it already performs robust
|
||||||
for i in 1 2 3; do
|
# registry/base existence checks and can short-circuit heavy rebuilds.
|
||||||
echo "Base availability check ${i}/3 for ${BASE_REF_HASH}"
|
echo "Base rebuild decision delegated to Docker Build Base workflow"
|
||||||
|
|
||||||
# Manifest inspect is unreliable on some runners; use pull as truth.
|
|
||||||
if timeout 900 docker pull "${BASE_REF_HASH}" >/tmp/start-base-pull.log 2>&1; then
|
|
||||||
echo "pull_check=ok"
|
|
||||||
echo "Base rebuild needed: false"
|
|
||||||
echo "base_needed=false" >> "$GITHUB_OUTPUT"
|
|
||||||
exit 0
|
|
||||||
else
|
|
||||||
pull_exit=$?
|
|
||||||
echo "pull_check=failed exit_code=${pull_exit}"
|
|
||||||
if [ "${pull_exit}" -eq 124 ]; then
|
|
||||||
echo "Base pull timed out after 900s"
|
|
||||||
fi
|
|
||||||
if [ -s /tmp/start-base-pull.log ]; then
|
|
||||||
tail -n 20 /tmp/start-base-pull.log || true
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
if [ "${i}" -lt 3 ]; then
|
|
||||||
sleep 10
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "Base rebuild needed: true"
|
|
||||||
echo "base_needed=true" >> "$GITHUB_OUTPUT"
|
echo "base_needed=true" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
- name: Dispatch downstream workflow
|
- name: Dispatch downstream workflow
|
||||||
|
|||||||
@@ -14,7 +14,8 @@ concurrency:
|
|||||||
jobs:
|
jobs:
|
||||||
launch:
|
launch:
|
||||||
name: Launch CICD Start
|
name: Launch CICD Start
|
||||||
runs-on: ubuntu-act
|
# Lightweight dispatch-only job; avoid dependency on ubuntu-act image startup.
|
||||||
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Configure registry host resolution
|
- name: Configure registry host resolution
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user