forked from Nukesor/ultimate-poll-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (73 loc) · 2.35 KB
/
docker.yaml
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: Docker Image CI
on:
push:
branches:
- s16
jobs:
build:
runs-on: ubuntu-latest
environment: development
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Create config file
uses: canastro/copy-file-action@master
with:
source: "ultimate_pollbot_example.toml"
target: "ultimate_pollbot.toml"
- name: Update telegram.bot_name in config file
uses: colathro/toml-editor@1.1.1
with:
file: "ultimate_pollbot.toml"
key: "telegram.bot_name"
value: ${{ vars.BOT_NAME }}
- name: Update telegram.api_key in config file
uses: colathro/toml-editor@1.1.1
with:
file: "ultimate_pollbot.toml"
key: "telegram.api_key"
value: ${{ secrets.BOT_TOKEN }}
- name: Update telegram.admins in config file
uses: colathro/toml-editor@1.1.1
with:
file: "ultimate_pollbot.toml"
key: "telegram.admins"
value: ${{ vars.BOT_ADMINS }}
- name: Update api.admin in config file
uses: colathro/toml-editor@1.1.1
with:
file: "ultimate_pollbot.toml"
key: "api.admin"
value: ${{ vars.API_ADMIN }}
- name: Update api.seeders_chat_id in config file
uses: colathro/toml-editor@1.1.1
with:
file: "ultimate_pollbot.toml"
key: "api.seeders_chat_id"
value: ${{ vars.SEEDERS_CHAT_ID }}
- name: Update database.sql_uri in config file
uses: colathro/toml-editor@1.1.1
with:
file: "ultimate_pollbot.toml"
key: "database.sql_uri"
value: ${{ secrets.DB_URL }}
- name: Build and push bot
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ghcr.io/beniamiiin/ultimate-poll-bot:bot
- name: Build and push api
uses: docker/build-push-action@v4
with:
context: .
push: true
file: api.Dockerfile
tags: ghcr.io/beniamiiin/ultimate-poll-bot:api