Skip to content

Commit

Permalink
Increase number of returned branches from GH API
Browse files Browse the repository at this point in the history
  • Loading branch information
maartenweyns committed Nov 18, 2024
1 parent 1951d97 commit 4d466c7
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/build_and_push_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,14 @@ jobs:
exit 0
fi
DJ_BRANCHES=$(curl -s https://api.github.com/repos/${REPO}/branches | jq '.[].name' | rev | cut -c2- | rev | cut -c2-)
DJ_BRANCHES=$(curl -s https://api.github.com/repos/${REPO}/branches?per_page=100 | jq '.[].name' | rev | cut -c2- | rev | cut -c2-)
BRANCH_TO_BUILD=""
if [[ "$BRANCH_TO_BUILD" == "" ]] && echo "$DJ_BRANCHES" | grep -F -q -x "$INPUT_VERSION"; then
BRANCH_TO_BUILD=$INPUT_VERSION
DOCKER_TAGS+=( "$INPUT_VERSION" )
fi
if [[ "$INPUT_VERSION" == "main" ]]; then
BRANCH_TO_BUILD="main"
DOCKER_TAGS+=( "main" )
fi
if [[ "$BRANCH_TO_BUILD" != "" ]]; then
echo "DOCKER_TAGS: ${DOCKER_TAGS[*]}"
echo "BRANCH_TO_BUILD: $BRANCH_TO_BUILD"
Expand Down

0 comments on commit 4d466c7

Please sign in to comment.