-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (56 loc) · 1.83 KB
/
Copy pathbreaking.yml
File metadata and controls
67 lines (56 loc) · 1.83 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
64
65
66
67
name: Danish News Bot - Breaking News
on:
repository_dispatch:
types: [breaking_news]
workflow_dispatch:
inputs:
title:
description: 'Breaking News Title'
required: true
url:
description: 'Breaking News URL'
required: true
jobs:
run-bot:
runs-on: ubuntu-latest
permissions:
contents: read
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
USE_POSTGRES: 'true'
# Breaking data comes either from dispatch payload or manual input
BREAKING_TITLE: ${{ github.event.client_payload.title || github.event.inputs.title }}
BREAKING_URL: ${{ github.event.client_payload.url || github.event.inputs.url }}
# AI settings
MAX_GEMINI_REQUESTS: 2
BOT_MODE: breaking
# API Keys and Tokens
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
TELEGRAM_ADMIN_ID: ${{ secrets.TELEGRAM_ADMIN_ID }}
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
GEMINI_API_KEY_2: ${{ secrets.GEMINI_API_KEY_2 }}
GEMINI_API_KEY_3: ${{ secrets.GEMINI_API_KEY_3 }}
GEMINI_MODEL: gemini-3.5-flash
GROQ_API_KEY: ${{ secrets.GROQ_API_KEY }}
AI_PROVIDERS: "gemini,groq"
GO111MODULE: 'on'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.26.x'
cache: true
- name: Prepare deps and build
run: |
go mod download
mkdir -p bin
go build -o bin/dknews ./cmd/dknews
working-directory: ${{ github.workspace }}
- name: Publish Breaking News
run: |
echo "🚨 Starting Danish News Bot (Breaking Mode)..."
./bin/dknews -mode=breaking
working-directory: ${{ github.workspace }}