-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (40 loc) · 1.65 KB
/
worker-drop-old-in-progress-llm-check.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
name: Deploy worker drop-old-in-progress-llm-check
on:
workflow_dispatch:
inputs:
name:
description: 'Deploy Implementer'
default: 'World'
required: true
jobs:
deploy:
runs-on: ubuntu-latest
environment: prod
steps:
- uses: actions/checkout@v3
- name: Login to Yandex Cloud Container Registry
id: login-cr
uses: yc-actions/yc-cr-login@v1
with:
yc-sa-json-credentials: ${{ secrets.YC_SA_JSON_CREDENTIALS }}
- name: Build docker image
run: docker build . --file docker/worker/drop_old_in_progress_llm_check/Dockerfile --tag cr.yandex/crpqcg70aaep5tihmd33/common-backend-worker-drop-old-in-progress-llm-check:latest
- name: Push docker image to Yandex.Cloud registry
run: docker push cr.yandex/crpqcg70aaep5tihmd33/common-backend-worker-drop-old-in-progress-llm-check:latest
- name: Wait until Yandex.Cloud process new docker image
uses: jakejarvis/[email protected]
with:
time: '30s'
- name: Substitute the real value of variables
env:
MONGODB_URL: ${{ secrets.MONGODB_URL }}
MONGODB_DATABASE: ${{ secrets.MONGODB_DATABASE }}
run: |
sed -i "s|{{MONGODB_URL}}|$MONGODB_URL|g" ./k8s/worker/drop_old_in_progress_llm_check/cron.yaml
sed -i "s|{{MONGODB_DATABASE}}|$MONGODB_DATABASE|g" ./k8s/worker/drop_old_in_progress_llm_check/cron.yaml
- name: Deploy to k8s
uses: actions-hub/[email protected]
env:
KUBE_CONFIG: ${{ secrets.K8S_CONFIG }}
with:
args: apply -f ./k8s/worker/drop_old_in_progress_llm_check/cron.yaml