From dc3ba1e299d40a4e1761d2ef3090ae1e5eed394a Mon Sep 17 00:00:00 2001 From: night1rider Date: Wed, 6 May 2026 10:04:33 -0600 Subject: [PATCH] stabilize CI for renamed forks and slashed branch names --- .github/scripts/zephyr-4.x/zephyr-test.sh | 4 ++-- .github/workflows/zephyr-4.x.yml | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/scripts/zephyr-4.x/zephyr-test.sh b/.github/scripts/zephyr-4.x/zephyr-test.sh index 82aabf06be1..c65e6950f75 100755 --- a/.github/scripts/zephyr-4.x/zephyr-test.sh +++ b/.github/scripts/zephyr-4.x/zephyr-test.sh @@ -111,8 +111,7 @@ SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" LOG_DIR="${SCRIPT_DIR}/logs" mkdir -p "${LOG_DIR}" TIMESTAMP=$(date +%Y%m%d_%H%M%S) -ZVER="${ZEPHYR_VERSION#v}" -LOG_FILE="${LOG_DIR}/${ZVER}_${WOLFSSL_BRANCH}_${BOARD_TARGET//\//-}_${TIMESTAMP}.log" +LOG_FILE="${LOG_DIR}/${BOARD_SLUG}_${TIMESTAMP}.log" echo "==> wolfSSL repo: ${WOLFSSL_REPO}" echo "==> wolfSSL branch: ${WOLFSSL_BRANCH}" @@ -175,6 +174,7 @@ cd .. # --- 3. Update all modules (including wolfSSL) --- echo "==> [container] Running west update..." +export GIT_TERMINAL_PROMPT=0 west update -n -o=--depth=1 # --- 3b. Checkout specific commit if requested --- diff --git a/.github/workflows/zephyr-4.x.yml b/.github/workflows/zephyr-4.x.yml index 775b5631f1f..203ec2a48e5 100644 --- a/.github/workflows/zephyr-4.x.yml +++ b/.github/workflows/zephyr-4.x.yml @@ -47,8 +47,9 @@ jobs: id: src run: | if [[ "${{ github.event_name }}" == "pull_request" ]]; then - echo "repo=${{ github.event.pull_request.head.repo.clone_url }}" >> "$GITHUB_OUTPUT" - echo "branch=${{ github.event.pull_request.head.ref }}" >> "$GITHUB_OUTPUT" + # Fetch via upstream PR ref so renames, deletes, or visibility changes on the fork do not break us + echo "repo=https://github.com/${{ github.repository }}" >> "$GITHUB_OUTPUT" + echo "branch=refs/pull/${{ github.event.pull_request.number }}/head" >> "$GITHUB_OUTPUT" else echo "repo=https://github.com/${{ github.repository }}" >> "$GITHUB_OUTPUT" echo "branch=${{ github.ref_name }}" >> "$GITHUB_OUTPUT"