1616 export NXF_WORK=$(pwd)
1717
1818 - name : Install Nextflow
19- uses : nf-core/setup-nextflow@v2
19+ uses : nf-core/setup-nextflow@b4ec1bc7c16a94435159de94a05253542fddf6ef # v3
2020 with :
2121 version : ${{ matrix.NXF_VER }}
2222
@@ -40,34 +40,46 @@ runs:
4040 pwd
4141 ls -l
4242 working-directory : create-lint-wf/nf-core-testpipeline
43+
4344 # Run code style linting
44- - name : run pre-commit
45+ - name : run prek
4546 shell : bash
46- run : uv run pre-commit run --all-files
47- working-directory : create-lint-wf
47+ run : uv run prek run --config . pre-commit-config.yaml --all-files
48+ working-directory : create-lint-wf/nf-core-testpipeline
4849
4950 # Update modules to the latest version
5051 - name : nf-core modules update
5152 shell : bash
5253 run : uv run nf-core --log-file log.txt modules update --dir nf-core-testpipeline --all --no-preview
5354 working-directory : create-lint-wf
5455
56+ # Commit regenerated container configs so lint sees them as up to date
57+ - name : commit updated container configs
58+ shell : bash
59+ run : |
60+ cd nf-core-testpipeline
61+ git config user.email "nf-core-bot@nf-co.re"
62+ git config user.name "nf-core-bot"
63+ git add conf/containers_*.config
64+ git diff --cached --quiet || git commit -m "Update container configs after modules update"
65+ working-directory : create-lint-wf
66+
5567 # Remove TODO statements
5668 - name : remove TODO
5769 shell : bash
58- run : find nf-core-testpipeline -type f -exec sed -i 's#TODO nf-core:##g' {} \;
70+ run : find nf-core-testpipeline -not -path '*/.git/*' - type f -exec sed -i 's#TODO nf-core:##g' {} \;
5971 working-directory : create-lint-wf
6072
6173 # Uncomment includeConfig statement
6274 - name : uncomment include config
6375 shell : bash
64- run : find nf-core-testpipeline -type f -exec sed -i 's/\/\/ includeConfig/includeConfig/' {} \;
76+ run : find nf-core-testpipeline -not -path '*/.git/*' - type f -exec sed -i 's/\/\/ includeConfig/includeConfig/' {} \;
6577 working-directory : create-lint-wf
6678
6779 # Replace zenodo.XXXXXX to pass readme linting
6880 - name : replace zenodo.XXXXXX
6981 shell : bash
70- run : find nf-core-testpipeline -type f -exec sed -i 's/zenodo.XXXXXX/zenodo.123456/g' {} \;
82+ run : find nf-core-testpipeline -not -path '*/.git/*' - type f -exec sed -i 's/zenodo.XXXXXX/zenodo.123456/g' {} \;
7183 working-directory : create-lint-wf
7284
7385 # Run nf-core pipelines linting
88100
89101 - name : Upload log file artifact
90102 if : ${{ always() }}
91- uses : actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7
103+ uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
92104 with :
93105 name : nf-core-log-file-${{ matrix.NXF_VER }}
94106 path : create-lint-wf/log.txt
0 commit comments