99
1010permissions :
1111 contents : write
12+ pull-requests : write
1213
1314jobs :
1415 auto-format :
@@ -19,19 +20,42 @@ jobs:
1920 if : github.event_name == 'pull_request'
2021 with :
2122 fetch-depth : 0
22- ref : ${{ github.event.pull_request.head.ref }}
23+ ref : ${{ github.head_ref }}
2324 - uses : actions/checkout@v4
2425 if : github.event_name != 'pull_request'
2526 with :
2627 fetch-depth : 0
2728
28- - name : format
29+ - uses : actions/setup-python@v4
30+ with :
31+ python-version : 3.11
32+ - name : Install nextflow
33+ uses : nf-core/setup-nextflow@v1
34+ - name : git config
35+ run : |
36+ git config --global user.name "github-actions[bot]"
37+ git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
38+ - name : Install dependencies
39+ run : |
40+ python -m pip install --upgrade pip
41+ pip install .[dev]
42+
43+ - name : Write nf-schema docs
44+ run : |
45+ nf-core pipelines schema docs -f -x markdown -o docs/params.tmp
46+ echo "<!-- This doc is generated by: nf-core pipelines schema docs. Edit parameter descriptions in nextflow_schema.json -->\n" > docs/params.md
47+ cat docs/params.tmp >> docs/params.md
48+ rm -f docs/params.tmp
49+
50+ - name : Format
2951 uses : pre-commit/action@v3.0.1
3052 continue-on-error : true
3153
3254 - name : commit & push
3355 run : |
34- git config --global user.name "github-actions[bot]"
35- git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
56+ git add docs/params.md
57+ git commit -m "ci: π update params docs with 'nf-core pipelines schema docs'" || echo "nothing to commit"
58+
3659 git add .
37- git commit -m "ci: π€ format everything with pre-commit" && git push || echo "nothing to commit"
60+ git commit -m "ci: π€ format everything with pre-commit" || echo "nothing to commit"
61+ git push || echo "nothing to push"
0 commit comments