From 26befe6e6ec704a838fe524da6ee8711c539ddea Mon Sep 17 00:00:00 2001 From: Zhong Jianxin Date: Wed, 4 Dec 2024 20:03:48 +0800 Subject: [PATCH] workflows/eval: add eval summary to commit statuses --- .github/workflows/eval.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/eval.yml b/.github/workflows/eval.yml index f291e288c4348..bd7b311675ed2 100644 --- a/.github/workflows/eval.yml +++ b/.github/workflows/eval.yml @@ -246,6 +246,7 @@ jobs: if: needs.process.outputs.baseRunId permissions: pull-requests: write + statuses: write steps: - name: Download process result uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 @@ -285,3 +286,23 @@ jobs: GH_TOKEN: ${{ github.token }} REPOSITORY: ${{ github.repository }} NUMBER: ${{ github.event.number }} + + - name: Add eval summary to commit statuses + if: ${{ github.event_name == 'pull_request_target' }} + run: | + description=$(jq -r ' + "Package: added " + (.attrdiff.added | length | tostring) + + ", removed " + (.attrdiff.removed | length | tostring) + + ", changed " + (.attrdiff.changed | length | tostring) + + ", Rebuild: linux " + (.rebuildCountByKernel.linux | tostring) + + ", darwin " + (.rebuildCountByKernel.darwin | tostring) + '