From 2522af67926e12bfb6d4b28ac866177d7fd61535 Mon Sep 17 00:00:00 2001 From: copilotcoder Date: Tue, 2 Jun 2026 16:14:46 -0400 Subject: [PATCH] More CICD fixes again again again Signed-off-by: copilotcoder --- .gitea/workflows/cicd-start.yaml | 34 ++++++-------------------------- 1 file changed, 6 insertions(+), 28 deletions(-) diff --git a/.gitea/workflows/cicd-start.yaml b/.gitea/workflows/cicd-start.yaml index f367c78..63b5894 100644 --- a/.gitea/workflows/cicd-start.yaml +++ b/.gitea/workflows/cicd-start.yaml @@ -57,8 +57,6 @@ jobs: - name: Compute base hash and base-needed signal id: base-decision - env: - SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} run: | set -e @@ -68,34 +66,14 @@ jobs: sha256sum "${file1}" "${file2}" | sha256sum | cut -c1-16 } - if [ -f "Dockerfile.cicd-base" ] && [ -f ".dockerignore" ]; then - BASE_HASH=$(compute_hash "Dockerfile.cicd-base" ".dockerignore") - else - umask 077 - trap 'rm -f ~/.ssh/id_rsa' EXIT - - if [ -z "${SSH_PRIVATE_KEY}" ]; then - echo "❌ SSH_PRIVATE_KEY is empty" - exit 1 - fi - - mkdir -p ~/.ssh /tmp/base-hash-repo - echo "${SSH_PRIVATE_KEY}" > ~/.ssh/id_rsa - chmod 600 ~/.ssh/id_rsa - ssh-keyscan -p "${GITEA_SSH_PORT}" "${GITEA_SSH_HOST}" >> ~/.ssh/known_hosts 2>/dev/null - - cd /tmp/base-hash-repo - git init -q - git remote add origin "${GITEA_REPO_SSH_URL}" - GIT_SSH_COMMAND="ssh -i ~/.ssh/id_rsa -o IdentitiesOnly=yes -o StrictHostKeyChecking=no" \ - git fetch --depth 1 origin "${GITHUB_SHA}" - - git show FETCH_HEAD:Dockerfile.cicd-base > /tmp/Dockerfile.cicd-base - git show FETCH_HEAD:.dockerignore > /tmp/.dockerignore - - BASE_HASH=$(compute_hash "/tmp/Dockerfile.cicd-base" "/tmp/.dockerignore") + if [ ! -f "Dockerfile.cicd-base" ] || [ ! -f ".dockerignore" ]; then + echo "❌ Required hash inputs are missing in workspace" + ls -la + exit 1 fi + BASE_HASH=$(compute_hash "Dockerfile.cicd-base" ".dockerignore") + BASE_REF_HASH="${GITEA_REGISTRY}/darkhelm.org/plex-playlist-cicd-base:${BASE_HASH}" echo "Base hash: ${BASE_HASH}"