-
Notifications
You must be signed in to change notification settings - Fork 18
32 lines (27 loc) · 1.06 KB
/
warmer.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
name: Warm
on:
push:
paths: [.github/workflows/warmer.yml]
schedule:
# ┌──────────────── minute (0 - 59)
# │ ┌────────────── hour (0 - 23)
# │ │ ┌──────────── day of the month (1 - 31)
# │ │ │ ┌──────── month (1 - 12 or JAN-DEC)
# │ │ │ │ ┌────── day of the week (0 - 6 or SUN-SAT)
# │ │ │ │ │
# │ │ │ │ │
# │ │ │ │ │
# * * * * *
- cron: 0 0 */2 * *
jobs:
warm:
runs-on: ubuntu-latest
env:
REPOSITORY_NAME: ${{ github.event.repository.name }}
steps:
- name: cURL Swagger
run: |
[ ! "$(curl https://$GITHUB_REPOSITORY_OWNER-$REPOSITORY_NAME.hf.space/docs)" = "{\"detail\":\"Not Found\"}" ]
- name: cURL the API
run: |
[ "$(curl https://$GITHUB_REPOSITORY_OWNER-$REPOSITORY_NAME.hf.space/v1/)" = "\"Welcome to v1 of the API!"\" ]