Skip to content

update gpu snapshot (automated) #1930

update gpu snapshot (automated)

update gpu snapshot (automated) #1930

name: update-gpu-snapshot
run-name: update gpu snapshot (automated)
on:
issue_comment:
types: [created]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# renovate: datasource=github-releases depName=askimed/nf-test versioning=semver
NFT_VER: "0.9.3"
NXF_ANSI_LOG: false
# renovate: datasource=github-releases depName=nextflow/nextflow versioning=semver
NXF_VER: "25.10.2"
jobs:
update-gpu-snapshot:
# 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 update gpu snapshot') &&
github.repository == 'nf-core/modules'
runs-on: "runs-on=${{ github.run_id }}/family=g4dn.xlarge/image=ubuntu24-gpu-x64"
steps:
# indication that the snapshot is being updated
- name: React on comment
uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5
with:
comment-id: ${{ github.event.comment.id }}
reactions: eyes
# Use the @nf-core-bot token to check out so we can push later
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
with:
token: ${{ secrets.nf_core_bot_auth_token }}
- name: Get the test path from the comment (after "@nf-core-bot update gpu snapshot path:")
id: get-test-path
run: |
echo "test_path=$(echo ${{ github.event.comment.body }} | grep -oP 'path:\s*\K[^ ]+')" >> $GITHUB_OUTPUT
- name: if test path is empty, exit
uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5
if: steps.get-test-path.outputs.test_path == ''
with:
comment-id: ${{ github.event.comment.id }}
reactions: "-1"
- name: if test path is empty, exit
if: steps.get-test-path.outputs.test_path == ''
run: exit 0
# 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
run: gh pr checkout ${{ github.event.issue.number }}
env:
GITHUB_TOKEN: ${{ secrets.nf_core_bot_auth_token }}
- uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e # v5
with:
distribution: "temurin"
java-version: "17"
- name: Set up Nextflow
uses: nf-core/setup-nextflow@v2
with:
version: "${{ env.NXF_VER }}"
- name: Set up Python
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6
with:
python-version: "3.14"
- name: Set up nf-test
uses: nf-core/setup-nf-test@v1
with:
version: "${{ env.NFT_VER }}"
install-pdiff: true
- name: Update gpu snapshot
id: update-gpu-snapshot
run: |
nf-test test \
--profile=docker,gpu \
--verbose \
--ci \
--update-snapshot \
--filter process,workflow \
--tag gpu \
${{ steps.get-test-path.outputs.test_path }}
- name: Commit & push changes
run: |
git config user.email "[email protected]"
git config user.name "nf-core-bot"
git config push.default upstream
git add .
git status
git commit -m "[automated] Update gpu snapshot"
git push