Skip to content

Commit 4cdbfe0

Browse files
committed
update gh workflows
1 parent a8db7ee commit 4cdbfe0

File tree

4 files changed

+72
-0
lines changed

4 files changed

+72
-0
lines changed

.github/workflows/cron_update.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Dispatch Update
2+
3+
on:
4+
schedule:
5+
# 7:07 fridays
6+
- cron: '7 7 * * 5'
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
instance: [galaxy-qa1.galaxy.cloud.e-infra.cz, usegalaxy.cz, galaxy-umsa.grid.cesnet.cz]
18+
python-version: [3.11]
19+
steps:
20+
- uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0
23+
- name: Set up Python ${{ matrix.python-version }}
24+
uses: actions/setup-python@v5
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
- name: Install dependencies
28+
run: |
29+
python -m pip install --upgrade pip
30+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
31+
- name: Lint, Fix, and Update
32+
run: |
33+
make INSTANCE=$INSTANCE lint
34+
make INSTANCE=$INSTANCE update-all
35+
env:
36+
INSTANCE: ${{ inputs.instance }}
37+
- name: Set output variables
38+
id: vars
39+
run: |
40+
pr_title="Update all tools of $INSTANCE"
41+
{
42+
echo "pr_title=$pr_title"
43+
echo "branch_name=$INSTANCE"
44+
echo "pr_body<<EOF"
45+
echo "I ran the following:"
46+
echo "- make INSTANCE=$INSTANCE lint"
47+
echo "- make INSTANCE=$INSTANCE update-all"
48+
echo "EOF"
49+
} >> "$GITHUB_OUTPUT"
50+
env:
51+
INSTANCE: ${{ inputs.instance }}
52+
- name: Create Pull Request
53+
uses: peter-evans/create-pull-request@v7
54+
with:
55+
branch: create-pull-request/${{ steps.vars.outputs.branch_name }}
56+
# branch-suffix: random
57+
committer: CESNETbot <martin.cech@cesnet.cz>
58+
commit-message: ${{ steps.vars.outputs.pr_title }}
59+
title: ${{ steps.vars.outputs.pr_title }}
60+
body: ${{ steps.vars.outputs.pr_body }}
61+
labels: automated
62+
assignees: martenson
63+
reviewers: martenson
64+
# - name: Push changes
65+
# uses: ad-m/github-push-action@master
66+
# with:
67+
# github_token: ${{ secrets.GITHUB_TOKEN }}
68+
# branch: ${{ github.ref }}

.github/workflows/dispatch_lint.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
options:
1111
- galaxy-qa1.galaxy.cloud.e-infra.cz
1212
- usegalaxy.cz
13+
- galaxy-umsa.grid.cesnet.cz
1314

1415
jobs:
1516
build:

.github/workflows/fix.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ jobs:
3333
make INSTANCE=galaxy-qa1.galaxy.cloud.e-infra.cz fix
3434
make INSTANCE=usegalaxy.cz lint
3535
make INSTANCE=usegalaxy.cz fix
36+
make INSTANCE=galaxy-umsa.grid.cesnet.cz lint
37+
make INSTANCE=galaxy-umsa.grid.cesnet.cz fix
3638
- name: Create Pull Request
3739
uses: peter-evans/create-pull-request@v7
3840
with:

.github/workflows/lint.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,4 @@ jobs:
3131
run: |
3232
make INSTANCE=galaxy-qa1.galaxy.cloud.e-infra.cz lint
3333
make INSTANCE=usegalaxy.cz lint
34+
make INSTANCE=galaxy-umsa.grid.cesnet.cz lint

0 commit comments

Comments
 (0)