-
Notifications
You must be signed in to change notification settings - Fork 2
54 lines (43 loc) · 1.46 KB
/
run_bot.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
51
52
53
54
name: Run bot
on:
push:
branches:
- main
schedule:
- cron: '0 */6 * * *'
workflow_dispatch: {} # Add workflow dispatch for manual triggering
jobs:
run-bot:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Pass Environment Variables and Run Scripts
env:
BOT_TOKEN: ${{ secrets.BOT_TOKEN }}
COG_SERVICE_KEY: ${{ secrets.COG_SERVICE_KEY }}
COG_SERVICE_REGION: ${{ secrets.COG_SERVICE_REGION }}
SUBSCRIPTION_KEY: ${{ secrets.SUBSCRIPTION_KEY }}
run: |
# Pass the secrests as environment variables to script
python bot.py
# - name: Check for changes
# id: check_changes
# run: |
# git diff --exit-code || echo "::set-output name=changes::true"
# - name: Commit and Push Changes
# if: steps.check_changes.outputs.changes == 'true'
# run: |
# git pull
# git add .
# git commit -m "Updated leaderboard and resized images for Project 1."
# git remote set-url origin https://[email protected]/mlsanigeria/AI-Hacktober-MLSA.git
# git push