-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (55 loc) · 2.16 KB
/
Copy pathbot.yml
File metadata and controls
64 lines (55 loc) · 2.16 KB
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
55
56
57
58
59
60
61
62
63
name: News Bot
on:
push:
branches: [main]
schedule:
- cron: '0 */3 * * *'
workflow_dispatch:
permissions: {}
# Serialize publishers; the durable outbox also protects each send with a CAS claim.
concurrency:
group: news-bot
cancel-in-progress: false
jobs:
test:
permissions:
contents: read
uses: ./.github/workflows/ci.yml
run-bot:
needs: test
if: github.ref == 'refs/heads/main'
environment: production
permissions:
contents: read
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- name: Checkout repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.11'
cache: 'pip'
- name: Install dependencies
run: 'python -m pip install --require-hashes --only-binary=:all: -r requirements.txt'
- name: Run bot
env:
PYTHON_DOTENV_DISABLED: '1'
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
UNSPLASH_ACCESS_KEY: ${{ secrets.UNSPLASH_ACCESS_KEY }}
GROQ_API_KEY: ${{ secrets.GROQ_API_KEY }}
GROQ_API_KEY_2: ${{ secrets.GROQ_API_KEY_2 }}
GROQ_API_KEY_3: ${{ secrets.GROQ_API_KEY_3 }}
GROQ_API_KEYS: ${{ secrets.GROQ_API_KEYS }}
GROQ_MODEL: ${{ vars.GROQ_MODEL || secrets.GROQ_MODEL || 'openai/gpt-oss-120b' }}
GROQ_FALLBACK_MODEL: ${{ vars.GROQ_FALLBACK_MODEL || secrets.GROQ_FALLBACK_MODEL || 'openai/gpt-oss-20b' }}
NVIDIA_API_KEY: ${{ secrets.NVIDIA_API_KEY }}
NVIDIA_MODEL: ${{ vars.NVIDIA_MODEL || secrets.NVIDIA_MODEL || 'meta/llama-3.1-8b-instruct' }}
GIT_TOKEN: ${{ secrets.GIT_TOKEN || secrets.GH_PAT }}
NVD_API_KEY: ${{ secrets.NVD_API_KEY }}
GREYNOISE_API_KEY: ${{ secrets.GREYNOISE_API_KEY }}
run: python run_job.py