generated from GSM-MSG/MSG-Repository-Generator
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (40 loc) · 1.36 KB
/
ClearTodaySalt.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
41
42
43
44
45
46
47
48
49
50
name: Clear Used Salt
on:
schedule:
- cron: 0 15 * * *
jobs:
monthly_cron:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: 3.x
- name: Setup firebase admin json
run: |
touch msg-salty-firebase-adminsdk.json
echo "${{ secrets.FIREBASE_JSON }}" > msg-salty-firebase-adminsdk.json
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y build-essential libffi-dev
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run Python script
run: python clear_today_salt.py
- name: Salt bot Success Discord Notification
uses: sarisia/actions-status-discord@v1
if: ${{ success() }}
with:
title: "✅ 소금 10개 재장전 완료!"
webhook: ${{ secrets.SALT_BOT_WEBHOOK }}
color: 0x43962A
- name: Salt bot Failure Discord Notification
uses: sarisia/actions-status-discord@v1
if: ${{ failure() }}
with:
title: "❌ 소금 재장전이 실패했어요.."
webhook: ${{ secrets.SALT_BOT_WEBHOOK }}
color: 0xBB3639