Skip to content

Commit

Permalink
Only run reporting job when build ID output is not empty
Browse files Browse the repository at this point in the history
  • Loading branch information
cyqsimon committed Oct 12, 2023
1 parent c286138 commit ecfee6a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/rebuild-changed.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,13 @@ jobs:
echo "Build submitted: https://copr.fedorainfracloud.org/coprs/build/$BUILD_ID"
BUILD_IDS+=( "$BUILD_ID" )
done
echo "builds=$(printf '%s\n' "${BUILD_IDS[@]}" | jq -ncR '[inputs]')" >> "$GITHUB_OUTPUT"
echo "builds=$(printf '%s\n' "${BUILD_IDS[@]}" | jq -ncR '[inputs] | map(select(. != ""))')" >> "$GITHUB_OUTPUT"
report-status:
name: Report build status
needs: trigger-rebuild-for-modified
runs-on: ubuntu-latest
if: needs.trigger-rebuild-for-modified.outputs.builds != '[]'
strategy:
matrix:
build_id: ${{ fromJson(needs.trigger-rebuild-for-modified.outputs.builds) }}
Expand Down

0 comments on commit ecfee6a

Please sign in to comment.