Skip to content

feat(modules): add containers create subcommand #1

feat(modules): add containers create subcommand

feat(modules): add containers create subcommand #1

Workflow file for this run

name: Update CHANGELOG.md
on:
issue_comment:
types: [created] # Add "@nf-core-bot changelog" as a PR comment to trigger this workflow.
pull_request_target:
types: [opened]
branches:
- dev
jobs:
update_changelog:
runs-on: ubuntu-latest
steps:
- name: branch-deploy
id: branch-deploy
if: github.event_name == 'issue_comment'
uses: github/branch-deploy@c9fcc362bdcea69eecac6578dde245cd5e3a55bf # v10.4.3
with:
trigger: "@nf-core-bot changelog"
reaction: "eyes"
stable_branch: "dev"
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
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@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
python-version: "3.14"
- name: Install packages
run: 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@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
python-version: "3.14"
- name: Run pre-commit rules with prek
uses: j178/prek-action@0bb87d7f00b0c99306c8bcb8b8beba1eb581c037 # v1
with:
extra-args: --config .pre-commit-config.yaml --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 "core@nf-co.re"
git config user.name "nf-core-bot"
git add ${GITHUB_WORKSPACE}/CHANGELOG.md
git status
git commit -m "[automated] Update CHANGELOG.md"
git push