https://json.schemastore.org/ not available anymore #3055
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Update CHANGELOG.md | |
| on: | |
| issue_comment: | |
| types: [created] | |
| pull_request_target: | |
| types: [opened] | |
| branches: | |
| - dev | |
| jobs: | |
| update_changelog: | |
| runs-on: ubuntu-latest | |
| # Run if comment is on a PR with the main repo, and if it contains the magic keywords. | |
| # Or run on PR creation, unless asked otherwise in the title. | |
| if: | | |
| github.repository_owner == 'nf-core' && ( | |
| github.event_name == 'pull_request_target' || | |
| github.event.issue.pull_request && startsWith(github.event.comment.body, '@nf-core-bot changelog') | |
| ) | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 | |
| with: | |
| token: ${{ secrets.NF_CORE_BOT_AUTH_TOKEN }} | |
| # Action runs on the issue comment, so we don't get the PR by default. | |
| # Use the GitHub CLI to check out the PR: | |
| - name: Checkout Pull Request | |
| env: | |
| GH_TOKEN: ${{ secrets.NF_CORE_BOT_AUTH_TOKEN }} | |
| run: | | |
| if [[ "${{ github.event_name }}" == "issue_comment" ]]; then | |
| PR_NUMBER="${{ github.event.issue.number }}" | |
| elif [[ "${{ github.event_name }}" == "pull_request_target" ]]; then | |
| PR_NUMBER="${{ github.event.pull_request.number }}" | |
| fi | |
| gh pr checkout $PR_NUMBER | |
| - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6 | |
| with: | |
| python-version: "3.14" | |
| - name: Install packages | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install pyyaml | |
| - name: Update CHANGELOG.md from the PR title | |
| env: | |
| COMMENT: ${{ github.event.comment.body }} | |
| GH_TOKEN: ${{ secrets.NF_CORE_BOT_AUTH_TOKEN }} | |
| PR_NUMBER: ${{ github.event.issue.number || github.event.pull_request.number }} | |
| PR_TITLE: ${{ github.event.issue.title || github.event.pull_request.title }} | |
| run: | | |
| python ${GITHUB_WORKSPACE}/.github/workflows/changelog.py | |
| - name: Check if CHANGELOG.md actually changed | |
| id: file_changed | |
| run: | | |
| # Show the diff for debugging | |
| git diff -- ${GITHUB_WORKSPACE}/CHANGELOG.md | |
| # Check if file has unstaged changes | |
| [ -n "$(git diff -- ${GITHUB_WORKSPACE}/CHANGELOG.md)" ] && file_changed="TRUE" || file_changed="FALSE" | |
| echo "File changed: $file_changed" | |
| echo "changed=$file_changed" >> $GITHUB_OUTPUT | |
| - name: Set up Python 3.14 | |
| uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6 | |
| with: | |
| python-version: "3.14" | |
| cache: "pip" | |
| - name: Install pre-commit | |
| run: pip install pre-commit | |
| - name: Run pre-commit checks | |
| if: steps.file_changed.outputs.changed == 'TRUE' | |
| run: | | |
| pre-commit run --all-files | |
| - name: Commit and push changes | |
| if: steps.file_changed.outputs.changed == 'TRUE' | |
| env: | |
| GH_TOKEN: ${{ secrets.NF_CORE_BOT_AUTH_TOKEN }} | |
| run: | | |
| git config user.email "[email protected]" | |
| git config user.name "nf-core-bot" | |
| git add ${GITHUB_WORKSPACE}/CHANGELOG.md | |
| git status | |
| git commit -m "[automated] Update CHANGELOG.md" | |
| git push |