From 2dce511a78a2327b273c8c3f210b96b664ac2f4e Mon Sep 17 00:00:00 2001 From: Vyacheslav <64684523+adeepn@users.noreply.github.com> Date: Mon, 20 Mar 2023 16:16:05 +0300 Subject: [PATCH] Check for empty build branch (#3) --- .github/workflows/generate.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/generate.yml b/.github/workflows/generate.yml index 02c4188..24a629f 100644 --- a/.github/workflows/generate.yml +++ b/.github/workflows/generate.yml @@ -40,6 +40,9 @@ jobs: # Make a list of valid pairs from our config echo 'JSON_CONTENT<> $GITHUB_OUTPUT for BRANCH in legacy current midstream edge; do + if [ -z "${FILES}" ]; then + continue + fi FILES=$(cat os/targets/*.conf | grep $BRANCH | grep -v "^$" | grep -v "^#" | sed -n $LINE'p' | cut -d " " -f1 | uniq) while IFS= read -r line; do BOARDFAMILY=$(cat build/config/boards/$line.* | grep BOARDFAMILY | cut -d'"' -f2) @@ -53,7 +56,7 @@ jobs: RUNNER=ubuntu-latest [[ "${ARCH}" == arm64 ]] && RUNNER=aarch64 [[ "${BRANCH}" == current ]] && RUNNER=alfa - [[ "${BRANCH}" == edge ]] && RUNNER=beta + [[ "${BRANCH}" == edge ]] && RUNNER=beta echo "${LINUXFAMILY}:${BOARDFAMILY}:${BRANCH}:${line}:${RUNNER}" done <<< "$FILES" done | sort | uniq | sort -u -t: -k1,3 | cut -d":" -f3,4,5 | sort | uniq | sed "s/:/ /g" | awk '{ printf "%s%s%s\n", "{\"board\":\""$2"\",", "\"branch\":\""$1"\",", "\"runner\":\""$3"\"}" }' | jq -s >> $GITHUB_OUTPUT @@ -65,9 +68,9 @@ jobs: fail-fast: false # let other jobs try to complete if one fails matrix: include: ${{ fromJSON(needs.prepare.outputs.matrix) }} - + runs-on: "${{ matrix.runner }}" - + name: "${{ matrix.board }} ${{ matrix.branch }} ${{ matrix.runner }}" env: BRANCH: "${{ matrix.branch }}" @@ -100,7 +103,7 @@ jobs: bash ./compile.sh kernel "BRANCH=${{env.BRANCH}}" "BOARD=${{env.BOARD}}" SHARE_LOG=yes CLEAN_LEVEL="alldebs" FORCE_ARTIFACTS_DOWNLOAD="yes" ls -l output/debs/ du output - + - name: "Generate key id" # We need this in case we run multiple runners on one machine run: echo "RANDOM=ID_$((RANDOM%1000000))" >> $GITHUB_ENV shell: bash @@ -120,4 +123,3 @@ jobs: sudo apt-get -y -qq install lftp fi lftp -u upload, -e "set sftp:connect-program ssh -ax -i $HOME/.ssh/${{ env.RANDOM }}; set net:timeout 4;set net:max-retries 6;mirror -R --include-glob *.deb --no-empty-dirs --parallel=8 --no-perms output/debs/. debs-beta/ ;bye" sftp://users.armbian.com -