From 4d466c77f6b547595622efa792b3abe0fb163cc6 Mon Sep 17 00:00:00 2001 From: Maarten Weyns Date: Mon, 18 Nov 2024 11:42:32 +0100 Subject: [PATCH] Increase number of returned branches from GH API --- .github/workflows/build_and_push_docker.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/build_and_push_docker.yml b/.github/workflows/build_and_push_docker.yml index 18032a9..621a25c 100644 --- a/.github/workflows/build_and_push_docker.yml +++ b/.github/workflows/build_and_push_docker.yml @@ -55,7 +55,7 @@ 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 @@ -63,11 +63,6 @@ jobs: 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"