File tree 1 file changed +13
-5
lines changed
1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change 3
3
workflow_dispatch :
4
4
schedule :
5
5
- cron : " 0 6 * * *" # Every day at 6:00am UTC
6
- env :
7
- API_SECRET : ${{ secrets.API_SECRET }}
8
6
jobs :
9
7
clean :
10
8
name : " Clean"
11
9
runs-on : ubuntu-latest
10
+ env :
11
+ API_SECRET : ${{ secrets.API_SECRET }}
12
12
steps :
13
+ - name : Check required variables
14
+ run : |
15
+ if [ -z "${{ vars.APP_BASE_URL }}" ]; then
16
+ echo "Error: APP_BASE_URL is not set. Please set this variable in your GitHub repository settings."
17
+ exit 1
18
+ fi
19
+ echo "BASE_URL=${{ vars.APP_BASE_URL }}" >> $GITHUB_ENV
13
20
- name : Mark inactive polls as deleted
14
21
run : |
15
- curl -X "POST" --fail "https://app.rallly.co /api/house-keeping/delete-inactive-polls" \
22
+ curl -X "POST" --fail "${BASE_URL} /api/house-keeping/delete-inactive-polls" \
16
23
-H "Authorization: Bearer ${API_SECRET}" \
24
+ --max-time 300
17
25
- name : Remove deleted polls
18
26
run : |
19
- curl -X "POST" --fail "https://app.rallly.co /api/house-keeping/remove-deleted-polls" \
27
+ curl -X "POST" --fail "${BASE_URL} /api/house-keeping/remove-deleted-polls" \
20
28
-H "Content-Type: application/json" \
21
29
-H "Authorization: Bearer ${API_SECRET}" \
22
- -d '{"take": 1000}'
30
+ --max-time 300
You can’t perform that action at this time.
0 commit comments