Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Update CHANGELOG.md
on:
issue_comment:
types: [created]
types: [created] # Add "@nf-core-bot changelog" as a PR comment to trigger this workflow.
pull_request_target:
types: [opened]
branches:
Expand All @@ -10,15 +10,17 @@ on:
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:
- 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@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
with:
token: ${{ secrets.NF_CORE_BOT_AUTH_TOKEN }}
Expand Down
25 changes: 12 additions & 13 deletions .github/workflows/fix-linting.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,28 @@
name: Fix linting from a comment
on:
issue_comment:
types: [created]
types: [created] # Add "@nf-core-bot fix linting" as a PR comment to trigger this workflow.

jobs:
fix-linting:
# Only run if comment is on a PR with the main repo, and if it contains the magic keywords
if: >
contains(github.event.comment.html_url, '/pull/') &&
contains(github.event.comment.body, '@nf-core-bot fix linting') &&
github.repository == 'nf-core/tools'
runs-on: ubuntu-latest
permissions:
pull-requests: write

steps:
- name: branch-deploy
id: branch-deploy
uses: github/branch-deploy@c9fcc362bdcea69eecac6578dde245cd5e3a55bf # v10.4.3
with:
trigger: "@nf-core-bot fix linting"
reaction: "eyes"
stable_branch: "dev"

# Use the @nf-core-bot token to check out so we can push later
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
with:
token: ${{ secrets.nf_core_bot_auth_token }}

# indication that the linting is being fixed
- name: React on comment
uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5
with:
comment-id: ${{ github.event.comment.id }}
reactions: eyes

# Action runs on the issue comment, so we don't get the PR by default
# Use the gh cli to check out the PR
- name: Checkout Pull Request
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/update-template-snapshots.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
name: Update Template snapshots from a comment
on:
issue_comment:
types: [created]
types: [created] # Add "@nf-core-bot update template snapshots" as a PR comment to trigger this workflow.

jobs:
prepare-matrix:
name: Retrieve all template features
# Only run if comment is on a PR with the main repo, and if it contains the magic keywords
if: >
contains(github.event.comment.html_url, '/pull/') &&
contains(github.event.comment.body, '@nf-core-bot') &&
contains(github.event.comment.body, 'update template snapshots') &&
github.repository == 'nf-core/tools'
runs-on: ubuntu-latest
permissions:
pull-requests: write
outputs:
all_features: ${{ steps.create_matrix.outputs.matrix }}

steps:
- name: branch-deploy
id: branch-deploy
uses: github/branch-deploy@c9fcc362bdcea69eecac6578dde245cd5e3a55bf # v10.4.3
with:
trigger: "@nf-core-bot update template snapshots"
reaction: "eyes"
stable_branch: "dev"

- name: checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5

Expand All @@ -28,6 +33,8 @@ jobs:
update-snapshots:
needs: [prepare-matrix]
runs-on: ubuntu-latest
permissions:
pull-requests: write
strategy:
matrix:
TEMPLATE: ${{ fromJson(needs.prepare-matrix.outputs.all_features) }}
Expand All @@ -40,13 +47,6 @@ jobs:
with:
token: ${{ secrets.nf_core_bot_auth_token }}

# indication that the command is running
- name: React on comment
uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5
with:
comment-id: ${{ github.event.comment.id }}
reactions: eyes

# Action runs on the issue comment, so we don't get the PR by default
# Use the gh cli to check out the PR
- name: Checkout Pull Request
Expand Down
17 changes: 10 additions & 7 deletions .github/workflows/update-textual-snapshots.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
name: Update Textual snapshots from a comment
on:
issue_comment:
types: [created]
types: [created] # Add "@nf-core-bot update textual snapshots" as a PR comment to trigger this workflow.

jobs:
update-snapshots:
# Only run if comment is on a PR with the main repo, and if it contains the magic keywords
if: >
contains(github.event.comment.html_url, '/pull/') &&
contains(github.event.comment.body, '@nf-core-bot') &&
contains(github.event.comment.body, 'update textual snapshots') &&
github.repository == 'nf-core/tools'
runs-on: ubuntu-latest

steps:
- name: branch-deploy
id: branch-deploy
uses: github/branch-deploy@c9fcc362bdcea69eecac6578dde245cd5e3a55bf # v10.4.3
with:
trigger: "@nf-core-bot update textual snapshots"
reaction: "eyes"
stable_branch: "dev"

# Use the @nf-core-bot token to check out so we can push later
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
with:
Expand Down