-
Notifications
You must be signed in to change notification settings - Fork 1
58 lines (50 loc) · 1.74 KB
/
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
55
56
57
58
# Deploy the bot
name: bot
concurrency:
group: ${{ github.ref_name }}
on:
workflow_dispatch:
push:
branches: [ "main" ]
paths:
- 'orchard/bot/**/*'
jobs:
deploy-bot:
runs-on: ubuntu-latest
steps:
- name: Inject slug/short variables
uses: rlespinasse/github-slug-action@v4
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: checkout
uses: actions/checkout@v3
- name: install flyctl
uses: superfly/flyctl-actions/setup-flyctl@master
- name: fly me to the moon
run: >
flyctl deploy
--config orchard/bot/fly.toml
--dockerfile orchard/bot/Dockerfile
--app orchard-bot-main
--env KEY_ID=$KEY_ID
--env B2_ACCESS_KEY=$B2_ACCESS_KEY
--env BOT_TOKEN=$BOT_TOKEN
--env PUBLIC_KEY=$PUBLIC_KEY
--env APPLICATION_ID=$APPLICATION_ID
--env DEV_GUILD=$DEV_GUILD
--env SECRET_KEY_ORCH=$SECRET_KEY_ORCH
--env LITESTREAM_PATH=status-main
--env LITESTREAM_ON=true
--env TYPESENSE_URL=https://api.rhythm.cafe/typesense
--env BOT_VERSION=${{ env.GITHUB_SHA_SHORT }}
--env GITHUB_TOKEN=$MY_GITHUB_TOKEN
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
KEY_ID: ${{ secrets.B2_KEY_ID }}
B2_ACCESS_KEY: ${{ secrets.B2_APPLICATION_KEY }}
BOT_TOKEN: ${{ secrets.BOT_TOKEN }}
PUBLIC_KEY: ${{ secrets.PUBLIC_KEY }}
APPLICATION_ID: ${{ secrets.APPLICATION_ID }}
DEV_GUILD: ${{ secrets.DEV_GUILD }}
SECRET_KEY_ORCH: ${{ secrets.SECRET_KEY_ORCH }}
MY_GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }}
working-directory: .