From 70df5453a9ce098909afdb845fd782b035992824 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20B=20M=C3=A5rtensson?= <53905247+Jon-b-m@users.noreply.github.com> Date: Fri, 3 May 2024 00:02:47 +0200 Subject: [PATCH] Use any repo name (#634) Prevents GitHub build errors due to your iAPS fork repo name. Allows you to choose any repo name for your iAPS fork when building with GitHub. --- .github/workflows/build_iAPS.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_iAPS.yml b/.github/workflows/build_iAPS.yml index e3bd655e49..afdc535039 100644 --- a/.github/workflows/build_iAPS.yml +++ b/.github/workflows/build_iAPS.yml @@ -56,7 +56,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - if [[ "$(gh api -H "Accept: application/vnd.github+json" /repos/${{ github.repository_owner }}/iAPS/branches | jq --raw-output 'any(.name=="alive")')" == "true" ]]; then + if [[ "$(gh api -H "Accept: application/vnd.github+json" /repos/${{ github.repository_owner }}/${{ github.event.repository.name }}/branches | jq --raw-output 'any(.name=="alive")')" == "true" ]]; then echo "Branch 'alive' exists." echo "ALIVE_BRANCH_EXISTS=true" >> $GITHUB_ENV # Set ALIVE_BRANCH_EXISTS to true else @@ -80,7 +80,7 @@ jobs: --method POST \ -H "Authorization: token $GITHUB_TOKEN" \ -H "Accept: application/vnd.github.v3+json" \ - /repos/${{ github.repository_owner }}/iAPS/git/refs \ + /repos/${{ github.repository_owner }}/${{ github.event.repository.name }}/git/refs \ -f ref='refs/heads/alive' \ -f sha=$SHA