fix error in .github/workflows/stabilise-ebuild.yml when nothing to stabilizse

Signed-off-by: Anton Fischl <github@fischl-online.de>
This commit is contained in:
Anton Fischl 2023-01-28 11:34:05 +01:00
parent 3e22a36180
commit 136509798f
Signed by: anton
GPG Key ID: 87E4939135F3A567
1 changed files with 12 additions and 3 deletions

View File

@ -10,6 +10,7 @@ jobs:
runs-on: ubuntu-latest
outputs:
TODO_JSON: ${{ steps.find-ebuilds.outputs.TODO_JSON }}
skip: ${{ steps.find-ebuilds.outputs.skip }}
steps:
- name: Checkout code
uses: actions/checkout@v3
@ -27,9 +28,16 @@ jobs:
echo "$ebuild"|sed -E 's#^\./##;s#/[^/]+/#/#;s#\.ebuild$##' >>.todo.lst
fi
done < <(find -type f -name "*.ebuild" -print0|xargs -r0 grep -l '^KEYWORDS=.*~amd64')
cat .todo.lst
TODO_JSON="$(jq --compact-output --monochrome-output --raw-input --slurp 'split("\n") | map(select(. != ""))' .todo.lst)"
echo "TODO_JSON=$TODO_JSON" >> $GITHUB_OUTPUT
if [ -r .todo.lst ]; then
echo "xxxxxxxxxxxxxxxxxxxxx"
echo "Todo:"
cat .todo.lst
TODO_JSON="$(jq --compact-output --monochrome-output --raw-input --slurp 'split("\n") | map(select(. != ""))' .todo.lst)"
echo "TODO_JSON=$TODO_JSON" >> $GITHUB_OUTPUT
echo "skip=false" >> $GITHUB_OUTPUT
else
echo "skip=true" >> $GITHUB_OUTPUT
fi
stabilise:
runs-on: ubuntu-latest
@ -37,6 +45,7 @@ jobs:
image: ghcr.io/antonfischl1980/gentoo-ci:main
needs:
- find-ebuilds-to-stabilise
if: ${{ !needs.find-ebuilds-to-stabilise.outputs.skip }}
strategy:
fail-fast: false
matrix: