Skip to content

Commit

Permalink
Added linting comment github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
apetkau committed Mar 8, 2024
1 parent 2cc089e commit 88e9764
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/linting_comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: nf-core linting comment
# This workflow is triggered after the linting action is complete
# It posts an automated comment to the PR, even if the PR is coming from a fork

on:
workflow_run:
workflows: ["nf-core linting"]

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Download lint results
uses: dawidd6/action-download-artifact@f6b0bace624032e30a85a8fd9c1a7f8f611f5737 # v3
with:
workflow: linting.yml
workflow_conclusion: completed

- name: Get PR number
id: pr_number
run: echo "pr_number=$(cat linting-logs/PR_number.txt)" >> $GITHUB_OUTPUT

- name: Post PR comment
uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31 # v2
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
number: ${{ steps.pr_number.outputs.pr_number }}
path: linting-logs/lint_results.md

0 comments on commit 88e9764

Please sign in to comment.