forked from snakemake/snakemake-workflow-catalog
-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (68 loc) · 2.06 KB
/
generate.yml
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
name: Generate catalog
on:
# TODO uncomment once we know the scraping works well again
#schedule:
# - cron: 0 5 * * *
push:
branches:
- main
jobs:
generate-catalog:
runs-on: ubuntu-latest
strategy:
matrix:
offset: [0, 10, 20, 30, 40, 50, 60, 70, 80, 90]
max-parallel: 1
steps:
- uses: actions/checkout@v4
with:
ref: main
- name: deployment
uses: mamba-org/provision-with-micromamba@main
- name: generate-catalog
shell: bash -l {0}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OFFSET: ${{ matrix.offset }}
run: |
python scripts/generate-catalog.py
- name: Commit files
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -m "Add changes" -a
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
cleanup-catalog:
runs-on: ubuntu-latest
needs: generate-catalog
strategy:
matrix:
offset: [0, 10, 20, 30, 40, 50, 60, 70, 80, 90]
max-parallel: 1
steps:
- uses: actions/checkout@v4
with:
ref: main
- name: deployment
uses: mamba-org/provision-with-micromamba@main
- name: generate-catalog
shell: bash -l {0}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OFFSET: ${{ matrix.offset }}
run: |
python scripts/cleanup-catalog.py
- name: Commit files
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -m "Add changes" -a
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}