Skip to content

Commit e51fb1f

Browse files
authored
support both dispatch and cron for IWC action
1 parent a7e936d commit e51fb1f

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed
Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
name: Dispatch update IWC tools
2-
1+
name: Update IWC tools
32
on:
43
workflow_dispatch:
54
inputs:
@@ -11,12 +10,21 @@ on:
1110
- galaxy-qa1.galaxy.cloud.e-infra.cz
1211
- usegalaxy.cz
1312
- galaxy-umsa.grid.cesnet.cz
13+
schedule:
14+
- cron: '9 9 * * *' # every day at 09:09 UTC
15+
1416
jobs:
1517
update-repos:
1618
permissions:
1719
contents: write
1820
pull-requests: write
1921
runs-on: ubuntu-latest
22+
strategy:
23+
matrix:
24+
instance: >-
25+
${{ (github.event_name == 'workflow_dispatch')
26+
&& [github.event.inputs.instance]
27+
|| ['galaxy-qa1.galaxy.cloud.e-infra.cz', 'usegalaxy.cz', 'galaxy-umsa.grid.cesnet.cz'] }}
2028
steps:
2129
- uses: actions/setup-python@v5
2230
with:
@@ -29,16 +37,16 @@ jobs:
2937
- name: Clone IWC repo
3038
run: git clone https://github.com/galaxyproject/iwc /tmp/iwc
3139
- name: Run update script
32-
run: python scripts/get_iwc_tools.py -w /tmp/iwc -s ${{ inputs.instance }} -u uncategorized.yml
40+
run: python scripts/get_iwc_tools.py -w /tmp/iwc -s ${{ matrix.instance }} -u uncategorized.yml
3341
- name: Get current date
3442
id: date
3543
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
3644
- name: Create Pull Request
3745
uses: peter-evans/create-pull-request@v7
3846
with:
39-
branch: iwc-update-${{ inputs.instance }}
47+
branch: iwc-update-${{ matrix.instance }}
4048
committer: CESNETbot <[email protected]>
41-
title: Install IWC tools for ${{ inputs.instance }}
49+
title: Install IWC tools for ${{ matrix.instance }}
4250
commit-message: "output of get_iwc_tools.py"
4351
labels: automated
4452
assignees: martenson

0 commit comments

Comments
 (0)