Skip to content

feat: add docs auto-linking & code folding in R Markdown reports #223

feat: add docs auto-linking & code folding in R Markdown reports

feat: add docs auto-linking & code folding in R Markdown reports #223

Workflow file for this run

name: auto-format
on:
workflow_dispatch:
pull_request:
env:
GH_TOKEN: ${{ github.token }}
permissions:
contents: write
pull-requests: write
jobs:
auto-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
if: github.event_name == 'pull_request'
with:
fetch-depth: 0
ref: ${{ github.head_ref }}
- uses: actions/checkout@v4
if: github.event_name != 'pull_request'
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install nextflow
uses: nf-core/setup-nextflow@v1
- name: git config
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[dev]
- id: changed-files
name: Check changed files
uses: knu/changed-files@v1
with:
paths: |
CITATION.cff
nextflow_schema.json
nextflow.config
- name: Write nf-schema docs
if: contains(steps.changed-files.outputs.changed_files_json, 'nextflow')
run: |
nf-core pipelines schema docs -f -x markdown -o docs/params.md
echo "<!-- this doc is generated by: nf-core pipelines schema docs -->" >> docs/params.md
- uses: citation-file-format/cffconvert-github-action@2.0.0
if: ${{ hashFiles('CITATION.cff') != '' && steps.changed-files.outputs.matched_files != '' }}
with:
args: "--format codemeta --outfile codemeta.json"
- name: Format
uses: pre-commit/action@v3.0.1
continue-on-error: true
- name: commit & push
run: |
git add docs/params.md
git commit -m "ci: 📑 update params docs with 'nf-core pipelines schema docs'" || echo "nothing to commit"
git add .
git commit -m "ci: 🤖 format everything with pre-commit" || echo "nothing to commit"
git push || echo "nothing to push"