Skip to content

Commit

Permalink
Merge pull request #3212 from mashehu/fix-template-version-comment-ac…
Browse files Browse the repository at this point in the history
…tion

TEMPLATE: Fix version comment action
  • Loading branch information
mirpedrol authored Oct 11, 2024
2 parents 88dc61c + 1b429cb commit 5d368d7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
- Fix too many empty lines added by jinja ([#3204](https://github.com/nf-core/tools/pull/3204) and [#3206](https://github.com/nf-core/tools/pull/3206))
- Fix header blocks in local subworkflow including git merge marker-like strings ([#3201](https://github.com/nf-core/tools/pull/3201))
- Update included subworkflows and modules ([#3208](https://github.com/nf-core/tools/pull/3208))
- Fix `template_version_commant.yml` github action ([#3212](https://github.com/nf-core/tools/pull/3212))

## [v3.0.0 - Titanium Tapir](https://github.com/nf-core/tools/releases/tag/3.0.0) - [2024-10-08]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ jobs:
steps:
- name: Check out pipeline code
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Read template version from .nf-core.yml
uses: pietrobolcato/action-read-yaml@1.0.0
uses: nichmor/minimal-read-yaml@v0.0.2
id: read_yml
with:
config: ${{ github.workspace }}/.nf-core.yml
Expand All @@ -24,20 +26,21 @@ jobs:
- name: Check nf-core outdated
id: nf_core_outdated
run: pip list --outdated | grep nf-core
run: echo "OUTPUT=$(pip list --outdated | grep nf-core)" >> ${GITHUB_ENV}

- name: Post nf-core template version comment
uses: mshick/add-pr-comment@b8f338c590a895d50bcbfa6c5859251edc8952fc # v2
if: |
${{ steps.nf_core_outdated.outputs.stdout }} =~ 'nf-core'
contains(env.OUTPUT, 'nf-core')
with:
repo-token: ${{ secrets.NF_CORE_BOT_AUTH_TOKEN }}
allow-repeats: false
message: |
## :warning: Newer version of the nf-core template is 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.
For more documentation on how to update your pipeline, please see the [nf-core documentation](https://github.com/nf-core/tools?tab=readme-ov-file#sync-a-pipeline-with-the-template) and [Synchronisation documentation](https://nf-co.re/docs/contributing/sync).
> [!WARNING]
> Newer version of the nf-core template is 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.
>
> For more documentation on how to update your pipeline, please see the [nf-core documentation](https://github.com/nf-core/tools?tab=readme-ov-file#sync-a-pipeline-with-the-template) and [Synchronisation documentation](https://nf-co.re/docs/contributing/sync).
#{%- endraw %}

0 comments on commit 5d368d7

Please sign in to comment.