Skip to content

Commit

Permalink
automated builds
Browse files Browse the repository at this point in the history
use env Variable for alive-Branch
  • Loading branch information
mountrcg committed Apr 22, 2024
1 parent 5430638 commit 08e685b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build_iAPS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ 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
echo "Branch 'alive' exists."
if [[ "$(gh api -H "Accept: application/vnd.github+json" /repos/${{ github.repository_owner }}/iAPS/branches | jq --raw-output 'any(.name==${{ env.ALIVE_BRANCH }})')" == "true" ]]; then
echo "Branch ${{ env.ALIVE_BRANCH }} exists."
echo "ALIVE_BRANCH_EXISTS=true" >> $GITHUB_ENV # Set ALIVE_BRANCH_EXISTS to true
else
echo "Branch 'alive' does not exist."
echo "Branch ${{ env.ALIVE_BRANCH }} does not exist."
echo "ALIVE_BRANCH_EXISTS=false" >> $GITHUB_ENV # Set ALIVE_BRANCH_EXISTS to false
fi
Expand All @@ -81,7 +81,7 @@ jobs:
-H "Authorization: token $GITHUB_TOKEN" \
-H "Accept: application/vnd.github.v3+json" \
/repos/${{ github.repository_owner }}/iAPS/git/refs \
-f ref='refs/heads/alive' \
-f ref='refs/heads/${{ env.ALIVE_BRANCH }}' \
-f sha=$SHA
# Performs keepalive to avoid stale fork
Expand Down

0 comments on commit 08e685b

Please sign in to comment.