Skip to content

Commit

Permalink
Split PR commenting out into a separate workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nihlus committed May 11, 2024
1 parent bc5b9e0 commit 87adfc5
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 6 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ permissions:
pull-requests: write
contents: write
packages: write
security-events: write

on:
push:
Expand Down Expand Up @@ -61,11 +62,10 @@ jobs:
output: both
thresholds: '60 80'

- name: Add Coverage PR Comment
uses: marocchino/sticky-pull-request-comment@v2
- uses: actions/upload-artifact@v4
if: github.event_name == 'pull_request'
with:
recreate: true
name: coverage
path: code-coverage-results.md

- name: Package
Expand All @@ -91,9 +91,6 @@ jobs:
name: docfx-site
path: docfx/docfx_project/_site/

permissions:
security-events: write

publish_docs:
name: Publish Documentation
needs: build
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/pr-comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Comment on pull request
on:
workflow_run:
workflows:
- .NET
types:
- completed

jobs:
comment:
runs-on: ubuntu-latest
if: >
github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success'
steps:
- name: Download coverage results
uses: actions/download-artifact@v4
with:
name: coverage
path: code-coverage-results.md

- name: Add coverage PR comment
uses: marocchino/sticky-pull-request-comment@v2
with:
recreate: true
path: code-coverage-results.md

0 comments on commit 87adfc5

Please sign in to comment.