File tree Expand file tree Collapse file tree 2 files changed +39
-7
lines changed
Expand file tree Collapse file tree 2 files changed +39
-7
lines changed Original file line number Diff line number Diff line change 1414jobs :
1515 tests :
1616 name : Tests (Ruby ${{ matrix.ruby }})
17- permissions :
18- pull-requests : write
1917 runs-on : ubuntu-latest
2018 continue-on-error : ${{ matrix.optional || false }}
2119 strategy :
@@ -55,13 +53,14 @@ jobs:
5553 exit 0 # Ignore error here to keep the green checkmark
5654 fi
5755 exit ${status}
58- - name : Add comment for optional failures
59- uses : thollander/actions-comment-pull-request@v3
56+ - name : Create optional failure comment
6057 if : ${{ matrix.optional && github.event.pull_request }}
58+ uses : hanakai-rb/repo-sync/pr-comment-artifact@main
6159 with :
62- comment-tag : " ${{ matrix.ruby }}-optional-failure-notice"
63- message : |
64- ℹ️ Optional job failed: Ruby ${{ matrix.ruby }}
60+ name : ci-ruby-${{ matrix.ruby }}
61+ pr-number : ${{ github.event.pull_request.number }}
62+ comment-tag : ruby-${{ matrix.ruby }}-optional-failure
63+ message : " ℹ️ Optional job failed: Ruby ${{ matrix.ruby }}"
6564 mode : ${{ steps.test.outputs.optional_fail == 'true' && 'upsert' || 'delete' }}
6665
6766 workflow-keepalive :
Original file line number Diff line number Diff line change 1+ # frozen_string_literal: true
2+
3+ # This file is synced from hanakai-rb/repo-sync
4+
5+ # Downloads comment artifacts from completed workflows and posts them to PRs. This allows source
6+ # workflows to run with read-only permissions on fork PRs while still posting comments via this
7+ # privileged workflow that runs in the base repo context.
8+ #
9+ # Comment artifacts should be generated using the `hanakai-rb/repo-sync/pr-comment-artifact@main`
10+ # action.
11+
12+ name : PR comments
13+
14+ on :
15+ workflow_run :
16+ workflows : ["CI"]
17+ types :
18+ - completed
19+
20+ permissions :
21+ pull-requests : write
22+
23+ jobs :
24+ post-comments :
25+ runs-on : ubuntu-latest
26+ if : github.event.workflow_run.event == "pull_request"
27+
28+ steps :
29+ - name : Post comments
30+ uses : hanakai-rb/repo-sync/pr-comments-from-artifacts@main
31+ with :
32+ workflow-run-id : ${{ github.event.workflow_run.id }}
33+ github-token : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments