I have a workflow that executes a bunch of fuzz tests and, at the end, calculates the total number of files in all crashers sub-directories. Later, in another job, I use that number to send a notification to Slack. But, for some reason, ::set-output produces no output and, most importantly, the next job does not get run even though the number of crashers is not zero!
jobs:
fuzz-nightly-test:
runs-on: ubuntu-latest
steps:
...
- name: Set crashers count
working-directory: test/fuzz
run: echo "::set-output name=crashers-count::$(find . -type d -name 'crashers' | xargs -I % sh -c 'ls % | wc -l' | awk '{total += $1} END {print total}')"
id: set-crashers-count
outputs:
crashers-count: ${{ steps.set-crashers-count.outputs.crashers-count }}
fuzz-nightly-fail:
needs: fuzz-nightly-test
if: ${{ needs.set-crashers-count.outputs.crashers-count != 0 }}
runs-on: ubuntu-latest
steps:
...
Does anybody know what I am doing wrong? Thank you!