-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (28 loc) · 1012 Bytes
/
Backend-CD.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
name: Backend CD
on:
workflow_run:
workflows: ["Backend CI"]
types:
- completed
jobs:
build:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
- name: Pull Docker image
run: docker compose pull
- name: Start Containers
env:
ENVIRONMENT: ${{ secrets.ENVIRONMENT }}
DB_NAME: ${{ secrets.DB_NAME}}
DB_USER: ${{ secrets.DB_USER}}
DB_HOST: ${{ secrets.DB_HOST}}
DB_PORT: ${{ secrets.DB_PORT}}
DB_PASSWORD: ${{ secrets.DB_PASSWORD}}
PORT: ${{ secrets.PORT}}
KEY: ${{ secrets.KEY}}
SECTRET: ${{ secrets.SECTRET}}
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY}}
run: docker compose up --force-recreate --detach
- name: Cleanup unused Docker images
run: docker image prune -f