-
Notifications
You must be signed in to change notification settings - Fork 40
40 lines (34 loc) · 1.44 KB
/
version_comment.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: nf-core template version comment
# This workflow is triggered on PRs to check if the pipeline template version matches the latest.
# It posts a comment on the PR, even if it comes from a fork.
on:
pull_request_target:
jobs:
check_version:
runs-on: ubuntu-latest
steps:
- name: Check out pipeline code
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
- name: Read template version from .nf-core.yml
uses: pietrobolcato/action-read-yaml@1.0.0
id: read_yml
with:
config: ${{ github.workspace }}/.nf-core.yml
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install nf-core==${{ steps.read_yml.outputs['nf_core_version'] }}
- name: Check nf-core outdated
id: nf_core_outdated
run: pip list --outdated | grep nf-core
- name: Post nf-core last version comment
uses: mshick/add-pr-comment@b8f338c590a895d50bcbfa6c5859251edc8952fc # v2
if: |
${{ steps.nf_core_outdated.outputs.stdout }} =~ 'nf-core'
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
allow-repeats: false
message: |
## :warning: New nf-core template version available
Your pipeline is using an old version of the nf-core template: ${{ steps.read_yml.outputs['nf_core_version'] }}.
Please update your pipeline to the latest version.