From 57e254796e7e1186a3f383e0c9ac5cf7c8721386 Mon Sep 17 00:00:00 2001 From: bjornoleh <63544115+bjornoleh@users.noreply.github.com> Date: Mon, 25 Mar 2024 22:43:40 +0100 Subject: [PATCH] Update build_loop.yml --- .github/workflows/build_loop.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_loop.yml b/.github/workflows/build_loop.yml index dc9f6ebc2..696656a84 100644 --- a/.github/workflows/build_loop.yml +++ b/.github/workflows/build_loop.yml @@ -68,10 +68,16 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GH_PAT }} run: | - SHA=$(curl --request GET \ - --url "https://api.github.com/repos/${{ env.UPSTREAM_REPO }}/git/refs/heads/dev" \ - --header "Authorization: Bearer $GH_TOKEN" \ - --silent | jq -r '.object.sha') + response=$(curl --request GET \ + --url "https://api.github.com/repos/${{ env.UPSTREAM_REPO }}/git/refs/heads/dev" \ + --header "Authorization: Bearer $GH_TOKEN" \ + --silent) + echo "API Response: $response" + SHA=$(echo "$response" | jq -r '.object.sha') + if [ "$SHA" = "null" ]; then + echo "Error: Unable to retrieve SHA for the dev branch." + exit 1 + fi echo "SHA of dev branch: $SHA"; # Create alive branch based on LoopKit/LoopWorkspace:dev