Skip to content

Clear Used Salt

Clear Used Salt #25

name: Clear Used Salt
on:
schedule:
- cron: 0 15 * * *
jobs:
clear_salt_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.11
- name: Setup firebase admin json
uses: jsdaniell/create-json@1.1.2
with:
name: "msg-salty-firebase-adminsdk.json"
json: ${{ secrets.FIREBASE_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