-
Notifications
You must be signed in to change notification settings - Fork 1k
120 lines (107 loc) · 4.26 KB
/
update-sentieon-snapshot.yml
File metadata and controls
120 lines (107 loc) · 4.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
name: update-sentieon-snapshot
run-name: update sentieon 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.4"
NXF_ANSI_LOG: false
# renovate: datasource=github-releases depName=nextflow/nextflow versioning=semver
NXF_VER: "25.10.2"
jobs:
update-sentieon-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 sentieon snapshot') &&
github.repository == 'nf-core/modules'
runs-on:
- runs-on=${{ github.run_id }}-nf-test-changes
- runner=4cpu-linux-x64
- image=ubuntu22-full-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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
token: ${{ secrets.nf_core_bot_auth_token }}
- name: Get the test path from the comment (after "@nf-core-bot update sentieon 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@be666c2fcd27ec809703dec50e508c2fdc7f6654 # 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@a309ff8b426b58ec0e2a45f0f869d46889d02405 # 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
# Set up secrets
- name: Set up Nextflow secrets
env:
SENTIEON_ENCRYPTION_KEY: ${{ secrets.SENTIEON_ENCRYPTION_KEY }}
SENTIEON_LICENSE_MESSAGE: ${{ secrets.SENTIEON_LICENSE_MESSAGE }}
if: env.SENTIEON_ENCRYPTION_KEY != '' && env.SENTIEON_LICENSE_MESSAGE != ''
shell: bash
run: |
python -m pip install cryptography
nextflow secrets set SENTIEON_AUTH_DATA $(python3 modules/nf-core/sentieon/license_message.py encrypt --key "$SENTIEON_ENCRYPTION_KEY" --message "$SENTIEON_LICENSE_MESSAGE")
- name: Update sentieon snapshot
id: update-sentieon-snapshot
env:
SENTIEON_LICSRVR_IP: ${{ secrets.SENTIEON_LICSRVR_IP }}
SENTIEON_AUTH_MECH: "GitHub Actions - token"
run: |
nf-test test \
--profile=docker \
--verbose \
--ci \
--update-snapshot \
--clean-snapshot \
--filter process,workflow \
--tag sentieon \
${{ steps.get-test-path.outputs.test_path }}
- name: clean up
run: |
rm -rf setup-nextflow
- name: Commit & push changes
run: |
git config user.email "core@nf-co.re"
git config user.name "nf-core-bot"
git config push.default upstream
git add .
git status
git commit -m "[automated] Update sentieon snapshot"
git push