-
-
Notifications
You must be signed in to change notification settings - Fork 2
40 lines (31 loc) · 982 Bytes
/
scheduler.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
name: Scheduler
on:
workflow_dispatch:
jobs:
schedule:
runs-on: ubuntu-latest
container:
image: archlinux
env:
CACTUS_CONFIG: ${{ secrets.CACTUS_CONFIG }}
steps:
- uses: arch4edu/cactus/actions/upgrade-archlinux@main
- name: Install runtime dependencies
run: pacman -S --noconfirm --needed git python-mysqlclient
- uses: arch4edu/cactus/actions/setup-cactus@main
- uses: arch4edu/cactus/actions/checkout-repository@main
- name: Scheduling
id: schedule
run: |
for i in $(seq 55)
do
(cd repository; git pull --rebase)
python -m cactus.scheduler.schedule repository
sleep 300
done
echo "result=success" >> $GITHUB_OUTPUT
- name: Start a new scheduler
if: ${{ always() }}
run: |
[ -z "${{ steps.schedule.outputs.result }}" ] && sleep 900
python -m cactus.scheduler.refresh