forked from minaminao/ctftime-discord-github-actions-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (32 loc) · 1.03 KB
/
ctftime.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
name: CTFTime
on:
schedule:
- cron: '0 0 * * *'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
notify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/cache@v2
with:
path: ctftime_cache
key: ${{ runner.os }}-ctftime-${{ hashFiles('ctftime_cache') }}
restore-keys: |
${{ runner.os }}-ctftime-
- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Run a one-line script
env:
DISCORD_WEBHOOK_URL: ${{ secrets.DiscordWebhookUrl }}
run: |
python -m pip install --upgrade pip
pip install -r CTFtime-Discord-hooks/requirements.txt
python CTFtime-Discord-hooks/CTFtimeDiscordHooks.py -w "$DISCORD_WEBHOOK_URL" -d 10 -c ctftime_cache