Skip to content

Commit 81616db

Browse files
zaniebzaniebot
andauthored
Publish Ruff ecosystem reports from GitHub Actions (astral-sh#29606)
Ruff ecosystem report comments currently depend on `astral-sh-bot`. Publish `ecosystem-result` after the CI ecosystem job using the shared STS publisher in astral-sh#29603. Comment IDs come exclusively from the key-value store. This handles same-repository pull requests, including runs that upload a report before failing. --------- Co-authored-by: zaniebot <242828183+zaniebot@users.noreply.github.com>
1 parent ad83e52 commit 81616db

1 file changed

Lines changed: 20 additions & 2 deletions

File tree

‎.github/workflows/ci.yaml‎

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -860,8 +860,6 @@ jobs:
860860
cat ecosystem-result-format-preview >> ecosystem-result
861861
echo "" >> ecosystem-result
862862
863-
# NOTE: astral-sh-bot uses this artifact to post comments on PRs.
864-
# Make sure to update the bot if you rename the artifact.
865863
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
866864
name: Upload Results
867865
with:
@@ -875,6 +873,26 @@ jobs:
875873
exit 1
876874
fi
877875
876+
publish-ecosystem-report:
877+
needs: ecosystem
878+
if: >-
879+
!cancelled() && github.event_name == 'pull_request' &&
880+
github.repository == 'astral-sh/ruff' &&
881+
github.event.pull_request.head.repo.full_name == github.repository &&
882+
(needs.ecosystem.result == 'success' || needs.ecosystem.result == 'failure')
883+
uses: astral-sh/ruff/.github/workflows/publish-pull-request-report.yml@main # zizmor: ignore[unpinned-uses]
884+
secrets:
885+
KV_API_URL: ${{ secrets.KV_API_URL }}
886+
STS_API_URL: ${{ secrets.STS_API_URL }}
887+
permissions:
888+
contents: read
889+
id-token: write
890+
with:
891+
report: ruff-ecosystem
892+
artifact: ecosystem-result
893+
filename: ecosystem-result
894+
title: "`ruff-ecosystem` results"
895+
878896
fuzz-ty:
879897
name: "Fuzz for new ty panics/timeouts"
880898
runs-on: ${{ github.repository == 'astral-sh/ruff' && 'depot-ubuntu-22.04-16' || 'ubuntu-latest' }}

0 commit comments

Comments
 (0)