-
Notifications
You must be signed in to change notification settings - Fork 1
115 lines (108 loc) · 4.11 KB
/
daily.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
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
name: "DucksManager daily"
on:
schedule:
- cron: "0 1 * * *"
workflow_dispatch:
jobs:
ducksmanager-daily:
runs-on: ubuntu-latest
environment: production
env:
REMOTE_ROOT: workspace/DucksManager2
steps:
- name: Run coa-updater
uses: appleboy/[email protected]
with:
host: ${{ secrets.PRODUCTION_SSH_HOST }}
fingerprint: ${{ secrets.PRODUCTION_SSH_FINGERPRINT }}
username: ${{ secrets.PRODUCTION_SSH_USER }}
key: ${{ secrets.PRODUCTION_SSH_KEY }}
command_timeout: 40m
script_stop: true
envs: REMOTE_ROOT
script: |
cd $REMOTE_ROOT/apps/coa-updater
docker compose pull
docker compose run --rm --no-deps coa-updater | ts "[%Y-%m-%d %H:%M:%S]"
- name: Run stats-updater
uses: appleboy/[email protected]
with:
host: ${{ secrets.PRODUCTION_SSH_HOST }}
username: ${{ secrets.PRODUCTION_SSH_USER }}
key: ${{ secrets.PRODUCTION_SSH_KEY }}
command_timeout: 90m
script_stop: true
envs: REMOTE_ROOT
script: |
cd $REMOTE_ROOT/apps/stats-updater
docker compose pull stats-updater
docker compose run --rm --no-deps stats-updater
- name: Run cover-updater
uses: appleboy/[email protected]
with:
host: ${{ secrets.PRODUCTION_SSH_HOST }}
username: ${{ secrets.PRODUCTION_SSH_USER }}
key: ${{ secrets.PRODUCTION_SSH_KEY }}
command_timeout: 20m
script_stop: true
envs: REMOTE_ROOT
script: |
cd $REMOTE_ROOT/apps/cover-updater
docker compose pull cover-updater
docker compose run --rm --no-deps cover-updater
- name: Run duck-estimator
uses: appleboy/[email protected]
with:
host: ${{ secrets.PRODUCTION_SSH_HOST }}
username: ${{ secrets.PRODUCTION_SSH_USER }}
key: ${{ secrets.PRODUCTION_SSH_KEY }}
command_timeout: 90m
script_stop: true
envs: REMOTE_ROOT
script: |
cd $REMOTE_ROOT/apps/duck-estimator
echo ${{ secrets.DOCKER_REGISTRY_TOKEN_DM }} | docker login ghcr.io -u bperel --password-stdin
docker compose pull
docker compose run --rm duck-estimator
- name: Run sprite-names-updater
uses: appleboy/[email protected]
with:
host: ${{ secrets.PRODUCTION_SSH_HOST }}
username: ${{ secrets.PRODUCTION_SSH_USER }}
key: ${{ secrets.PRODUCTION_SSH_KEY }}
command_timeout: 5m
script_stop: true
envs: REMOTE_ROOT
script: |
cd $REMOTE_ROOT
docker compose run --rm --no-deps sprite-names-updater
- name: Run subscription-handler
uses: appleboy/[email protected]
env:
SUBSCRIPTIONS_BASIC_AUTH: ${{ secrets.PRODUCTION_SUBSCRIPTIONS_BASIC_AUTH }}
with:
host: ${{ secrets.PRODUCTION_SSH_HOST }}
username: ${{ secrets.PRODUCTION_SSH_USER }}
key: ${{ secrets.PRODUCTION_SSH_KEY }}
command_timeout: 5m
script_stop: true
envs: SUBSCRIPTIONS_BASIC_AUTH
script: |
cd workspace/dm-server
docker compose run --rm --no-deps subscription-runner | ts '[%Y-%m-%d %H:%M:%S]'
curl --location --request POST "https://api.ducksmanager.net/ducksmanager/emails/subscription/release" \
--header "x-dm-version: 1.0.0" \
--header "Content-Type: application/x-www-form-urlencoded" \
--header "Authorization: Basic $SUBSCRIPTIONS_BASIC_AUTH"
- name: Run backup
uses: appleboy/[email protected]
with:
host: ${{ secrets.PRODUCTION_SSH_HOST }}
username: ${{ secrets.PRODUCTION_SSH_USER }}
key: ${{ secrets.PRODUCTION_SSH_KEY }}
command_timeout: 10m
script_stop: true
envs: REMOTE_ROOT
script: |
cd $REMOTE_ROOT/packages/backup
docker compose run --rm --no-deps backup