Skip to content

Commit

Permalink
ci(lint): Get the module name
Browse files Browse the repository at this point in the history
  • Loading branch information
edmundmiller committed Nov 20, 2024
1 parent 877d404 commit e9079b2
Showing 1 changed file with 22 additions and 6 deletions.
28 changes: 22 additions & 6 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
strategy:
fail-fast: false
matrix:
tags: "${{ fromJson(needs.nf-core-changes.outputs.modules_files) }}"
files: "${{ fromJson(needs.nf-core-changes.outputs.modules_files) }}"
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4

Expand Down Expand Up @@ -117,8 +117,16 @@ jobs:
- name: Install nf-core tools development version
run: python -m pip install --upgrade --force-reinstall git+https://github.com/nf-core/tools.git@dev

- name: Lint module ${{ matrix.tags }}
run: nf-core modules lint ${{ matrix.tags }}
- name: Get module name
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7
id: registry-name
with:
result-encoding: string
script: |
return '${{ matrix.files }}'.replace('modules/nf-core/', '').replace('/main.nf', '').replace('/', '_');
- name: Lint module ${{ matrix.files }}
run: nf-core modules lint ${{ matrix.files }}

nf-core-lint-subworkflows:
runs-on: ubuntu-latest
Expand All @@ -128,7 +136,7 @@ jobs:
strategy:
fail-fast: false
matrix:
tags: "${{ fromJson(needs.nf-core-changes.outputs.subworkflows_files) }}"
files: "${{ fromJson(needs.nf-core-changes.outputs.subworkflows_files) }}"
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4

Expand All @@ -151,8 +159,16 @@ jobs:
- name: Install nf-core tools development version
run: python -m pip install --upgrade --force-reinstall git+https://github.com/nf-core/tools.git@dev

- name: Lint module ${{ matrix.tags }}
run: nf-core subworkflows lint ${{ matrix.tags }}
- name: Get module name
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7
id: registry-name
with:
result-encoding: string
script: |
return '${{ matrix.files }}'.replace('modules/nf-core/', '').replace('/main.nf', '').replace('/', '_');
- name: Lint subworkflow ${{ matrix.files }}
run: nf-core subworkflows lint ${{ matrix.files }}

confirm-pass:
runs-on: ubuntu-latest
Expand Down

0 comments on commit e9079b2

Please sign in to comment.