-
Notifications
You must be signed in to change notification settings - Fork 34
384 lines (382 loc) · 15.1 KB
/
import.yaml
File metadata and controls
384 lines (382 loc) · 15.1 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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
name: import data
on:
schedule:
- cron: "0 0 * * 0"
workflow_dispatch:
jobs:
biotools:
runs-on: ubuntu-latest
outputs:
commit_hash: ${{ steps.commit-and-push-biotools.outputs.commit_hash }}
steps:
- name: checkout contents repository
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: delete previous import branch
run: |
branch_name="biotools-import-branch"
# Check if the branch exists on the remote repository
if git rev-parse --verify --quiet "origin/$branch_name"; then
# The branch exists, so it can be safely deleted
git push origin --delete "$branch_name"
echo "Branch $branch_name has been deleted."
else
# The branch does not exist
echo "Branch $branch_name does not exist on the remote repository."
fi
- name: Create and checkout feature branch
run: git checkout -b biotools-import-branch
- name: import bio.tools data from server
uses: research-software-ecosystem/utils/biotools-import@main
with:
repo-user: ${{ secrets.GITHUB_USER }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Commit and Push Changes
id: commit-and-push-biotools
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_user_name: Tools Platform Ecosystem bot
commit_user_email: tpe-bot@github.com
commit_author: Tools Platform Ecosystem bot <tpe-bot@github.com>
commit_message: import bio.tools data
branch: biotools-import-branch
create_branch: true
openebench:
runs-on: ubuntu-latest
outputs:
commit_hash: ${{ steps.commit-and-push-openebench.outputs.commit_hash }}
steps:
- name: checkout contents repository
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: delete previous import branch
run: |
branch_name="openebench-import-branch"
# Check if the branch exists on the remote repository
if git rev-parse --verify --quiet "origin/$branch_name"; then
# The branch exists, so it can be safely deleted
git push origin --delete "$branch_name"
echo "Branch $branch_name has been deleted."
else
# The branch does not exist
echo "Branch $branch_name does not exist on the remote repository."
fi
- name: Create and checkout feature branch
run: git checkout -b openebench-import-branch
- name: import OpenEBench data from server
uses: research-software-ecosystem/utils/openebench-import@main
with:
repo-user: ${{ secrets.GITHUB_USER }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Commit and Push Changes
id: commit-and-push-openebench
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_user_name: Tools Platform Ecosystem bot
commit_user_email: tpe-bot@github.com
commit_author: Tools Platform Ecosystem bot <tpe-bot@github.com>
commit_message: import OpenEBench data
branch: openebench-import-branch
create_branch: true
bioconda:
runs-on: ubuntu-latest
outputs:
commit_hash: ${{ steps.commit-and-push-bioconda.outputs.commit_hash }}
steps:
- name: checkout contents repository
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: delete previous import branch
run: |
branch_name="bioconda-import-branch"
# Check if the branch exists on the remote repository
if git rev-parse --verify --quiet "origin/$branch_name"; then
# The branch exists, so it can be safely deleted
git push origin --delete "$branch_name"
echo "Branch $branch_name has been deleted."
else
# The branch does not exist
echo "Branch $branch_name does not exist on the remote repository."
fi
- name: Create and checkout feature branch
run: git checkout -b bioconda-import-branch
- name: import bioconda data from server
uses: research-software-ecosystem/utils/bioconda-import@main
with:
repo-user: ${{ secrets.GITHUB_USER }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Commit and Push Changes
id: commit-and-push-bioconda
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_user_name: Tools Platform Ecosystem bot
commit_user_email: tpe-bot@github.com
commit_author: Tools Platform Ecosystem bot <tpe-bot@github.com>
commit_message: import bioconda data
branch: bioconda-import-branch
create_branch: true
biii:
runs-on: ubuntu-latest
outputs:
commit_hash: ${{ steps.commit-and-push-biii.outputs.commit_hash }}
steps:
- name: checkout contents repository
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: delete previous import branch
run: |
branch_name="biii-import-branch"
# Check if the branch exists on the remote repository
if git rev-parse --verify --quiet "origin/$branch_name"; then
# The branch exists, so it can be safely deleted
git push origin --delete "$branch_name"
echo "Branch $branch_name has been deleted."
else
# The branch does not exist
echo "Branch $branch_name does not exist on the remote repository."
fi
- name: Create and checkout feature branch
run: git checkout -b biii-import-branch
- name: import biii data from server
uses: research-software-ecosystem/utils/biii-import@main
with:
repo-user: ${{ secrets.GITHUB_USER }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Commit and Push Changes
id: commit-and-push-biii
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_user_name: Tools Platform Ecosystem bot
commit_user_email: tpe-bot@github.com
commit_author: Tools Platform Ecosystem bot <tpe-bot@github.com>
branch: biii-import-branch
create_branch: true
biocontainers:
runs-on: ubuntu-latest
outputs:
commit_hash: ${{ steps.commit-and-push-biocontainers.outputs.commit_hash }}
steps:
- name: checkout contents repository
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: delete previous import branch
run: |
branch_name="biocontainers-import-branch"
# Check if the branch exists on the remote repository
if git rev-parse --verify --quiet "origin/$branch_name"; then
# The branch exists, so it can be safely deleted
git push origin --delete "$branch_name"
echo "Branch $branch_name has been deleted."
else
# The branch does not exist
echo "Branch $branch_name does not exist on the remote repository."
fi
- name: Create and checkout feature branch
run: git checkout -b biocontainers-import-branch
- name: import biocontainers data from server
uses: research-software-ecosystem/utils/biocontainers-import@main
with:
repo-user: ${{ secrets.GITHUB_USER }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Commit and Push Changes
id: commit-and-push-biocontainers
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_user_name: Tools Platform Ecosystem bot
commit_user_email: tpe-bot@github.com
commit_author: Tools Platform Ecosystem bot <tpe-bot@github.com>
commit_message: import biocontainers data
branch: biocontainers-import-branch
create_branch: true
galaxytool:
runs-on: ubuntu-latest
outputs:
commit_hash: ${{ steps.commit-and-push-galaxytool.outputs.commit_hash }}
steps:
- name: checkout contents repository
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: delete previous import branch
run: |
branch_name="galaxytool-import-branch"
# Check if the branch exists on the remote repository
if git rev-parse --verify --quiet "origin/$branch_name"; then
# The branch exists, so it can be safely deleted
git push origin --delete "$branch_name"
echo "Branch $branch_name has been deleted."
else
# The branch does not exist
echo "Branch $branch_name does not exist on the remote repository."
fi
- name: Create and checkout feature branch
run: git checkout -b galaxytool-import-branch
- name: import galaxy tool data from server
uses: research-software-ecosystem/utils/galaxytool-import@main
with:
repo-user: ${{ secrets.GITHUB_USER }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Commit and Push Changes
id: commit-and-push-galaxytool
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_user_name: Tools Platform Ecosystem bot
commit_user_email: tpe-bot@github.com
commit_author: Tools Platform Ecosystem bot <tpe-bot@github.com>
commit_message: import galaxy tools data
branch: galaxytool-import-branch
create_branch: true
debian-med:
runs-on: ubuntu-latest
outputs:
commit_hash: ${{ steps.commit-and-push-debianmed.outputs.commit_hash }}
steps:
- name: checkout contents repository
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: delete previous import branch
run: |
branch_name="debianmed-import-branch"
# Check if the branch exists on the remote repository
if git rev-parse --verify --quiet "origin/$branch_name"; then
# The branch exists, so it can be safely deleted
git push origin --delete "$branch_name"
echo "Branch $branch_name has been deleted."
else
# The branch does not exist
echo "Branch $branch_name does not exist on the remote repository."
fi
- name: Create and checkout feature branch
run: git checkout -b debianmed-import-branch
- name: import Debian Med data
uses: research-software-ecosystem/utils/debian-med-import@main
with:
repo-user: ${{ secrets.GITHUB_USER }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Commit and Push Changes
id: commit-and-push-debianmed
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_user_name: Tools Platform Ecosystem bot
commit_user_email: tpe-bot@github.com
commit_author: Tools Platform Ecosystem bot <tpe-bot@github.com>
commit_message: import Debian Med tools data
branch: debianmed-import-branch
create_branch: true
bioconductor:
runs-on: ubuntu-latest
outputs:
commit_hash: ${{ steps.commit-and-push-bioconductor.outputs.commit_hash }}
steps:
- name: checkout contents repository
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: delete previous import branch
run: |
branch_name="bioconductor-import-branch"
# Check if the branch exists on the remote repository
if git rev-parse --verify --quiet "origin/$branch_name"; then
# The branch exists, so it can be safely deleted
git push origin --delete "$branch_name"
echo "Branch $branch_name has been deleted."
else
# The branch does not exist
echo "Branch $branch_name does not exist on the remote repository."
fi
- name: Create and checkout feature branch
run: git checkout -b bioconductor-import-branch
- name: import BioConductor data
uses: research-software-ecosystem/utils/bioconductor-import@main
with:
repo-user: ${{ secrets.GITHUB_USER }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Commit and Push Changes
id: commit-and-push-bioconductor
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_user_name: Tools Platform Ecosystem bot
commit_user_email: tpe-bot@github.com
commit_author: Tools Platform Ecosystem bot <tpe-bot@github.com>
commit_message: import BioConductor tools data
branch: bioconductor-import-branch
create_branch: true
merge:
runs-on: ubuntu-latest
needs:
- biotools
- openebench
- bioconda
- biii
- biocontainers
- galaxytool
- debian-med
- bioconductor
if: always()
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Merge feature branches
run: |
git config --local user.email "tpe-bot@github.com"
git config --local user.name "Tools Platform Ecosystem bot"
merge_branch_if_exists() {
local branch_name="$1"
# Check if the branch exists on the remote repository
if git ls-remote --exit-code --heads origin "$branch_name" &>/dev/null; then
# The branch exists on the remote, so it can be safely merged
git fetch origin "$branch_name"
git merge "origin/$branch_name"
echo "Merged $branch_name into the current branch."
else
# The branch does not exist on the remote
echo "Branch $branch_name does not exist on the remote repository."
fi
}
merge_branch_if_exists "biotools-import-branch"
merge_branch_if_exists "openebench-import-branch"
merge_branch_if_exists "bioconda-import-branch"
merge_branch_if_exists "biii-import-branch"
merge_branch_if_exists "biocontainers-import-branch"
merge_branch_if_exists "galaxytool-import-branch"
merge_branch_if_exists "debianmed-import-branch"
merge_branch_if_exists "bioconductor-import-branch"
git push origin master
clean-branches:
runs-on: ubuntu-latest
needs:
- merge
if: always()
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Delete feature branches
run: |
git config --local user.email "tpe-bot@github.com"
git config --local user.name "Tools Platform Ecosystem bot"
delete_branch_if_exists() {
local branch_name="$1"
# Check if the branch exists on the remote repository
if git ls-remote --exit-code --heads origin "$branch_name" &>/dev/null; then
# The branch exists on the remote, so it can be deleted
git push origin --delete "$branch_name"
echo "Deleted $branch_name into the current branch."
else
# The branch does not exist on the remote
echo "Branch $branch_name does not exist on the remote repository."
fi
}
delete_branch_if_exists "biotools-import-branch"
delete_branch_if_exists "openebench-import-branch"
delete_branch_if_exists "bioconda-import-branch"
delete_branch_if_exists "biii-import-branch"
delete_branch_if_exists "biocontainers-import-branch"
delete_branch_if_exists "galaxytool-import-branch"
delete_branch_if_exists "debianmed-import-branch"
delete_branch_if_exists "bioconductor-import-branch"