Skip to content

Commit 433ef3c

Browse files
committed
add update workflow
1 parent bc2d360 commit 433ef3c

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Tool Updating
2+
3+
on:
4+
# schedule:
5+
# # * is a special character in YAML so you have to quote this string
6+
# # We'll run this weekly at 23.00 on Saturday.
7+
# - cron: '0 23 * * 6'
8+
workflow_dispatch:
9+
inputs:
10+
instance:
11+
description: 'Galaxy Instance URL'
12+
required: true
13+
type: choice
14+
options:
15+
- galaxy-qa1.galaxy.cloud.e-infra.cz
16+
- usegalaxy.cz
17+
18+
permissions:
19+
contents: write
20+
21+
jobs:
22+
build:
23+
runs-on: ubuntu-latest
24+
strategy:
25+
matrix:
26+
python-version: [3.11]
27+
steps:
28+
- uses: actions/checkout@v4
29+
with:
30+
fetch-depth: 0
31+
- name: Set up Python ${{ matrix.python-version }}
32+
uses: actions/setup-python@v5
33+
with:
34+
python-version: ${{ matrix.python-version }}
35+
- name: Install dependencies
36+
run: |
37+
python -m pip install --upgrade pip
38+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
39+
- name: Lint, Fix, and Update
40+
run: |
41+
make INSTANCE=$INSTANCE lint
42+
make INSTANCE=$INSTANCE fix
43+
make INSTANCE=$INSTANCE update-all
44+
env:
45+
INSTANCE: ${{ inputs.instance }}
46+
- name: Commit files
47+
run: |
48+
git config --local user.email "[email protected]"
49+
git config --local user.name "github-actions[bot]"
50+
git add *.lock
51+
git commit -m "Updated all tools ($INSTANCE)" || true
52+
env:
53+
INSTANCE: ${{ inputs.instance }}
54+
- name: Create Pull Request
55+
uses: peter-evans/create-pull-request@v7
56+
# - name: Push changes
57+
# uses: ad-m/github-push-action@master
58+
# with:
59+
# github_token: ${{ secrets.GITHUB_TOKEN }}
60+
# branch: ${{ github.ref }}

0 commit comments

Comments
 (0)