-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (44 loc) · 1.54 KB
/
cd-release.yaml
File metadata and controls
49 lines (44 loc) · 1.54 KB
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: CD - Publish Release
on:
release:
types: [published]
jobs:
release-tag:
uses: ./.github/workflows/cd-build.yaml
with:
tag: ${{ github.event.release.tag_name }}
compose_file: docker/docker-compose.yaml
services: '["backend/api-service","backend/ai-service","backend/notification-service","frontend"]'
secrets: inherit
release-latest:
needs: release-tag
uses: ./.github/workflows/cd-build.yaml
with:
tag: latest
compose_file: docker/docker-compose.yaml
services: '["backend/api-service","backend/ai-service","backend/notification-service","frontend"]'
secrets: inherit
trigger-dokploy:
needs: release-latest
runs-on: ubuntu-latest
steps:
- name: Check secrets
id: check
env:
DOKPLOY_URL: ${{ secrets.DOKPLOY_URL }}
DOKPLOY_AUTH_TOKEN: ${{ secrets.DOKPLOY_AUTH_TOKEN }}
DOKPLOY_COMPOSE_ID: ${{ secrets.DOKPLOY_COMPOSE_ID }}
run: |
if [[ -n "$DOKPLOY_URL" && -n "$DOKPLOY_AUTH_TOKEN" && -n "$DOKPLOY_COMPOSE_ID" ]]; then
echo "configured=true" >> $GITHUB_OUTPUT
else
echo "configured=false" >> $GITHUB_OUTPUT
fi
- name: Dokploy Deployment
if: steps.check.outputs.configured == 'true'
uses: benbristow/dokploy-deploy-action@0.2.2
with:
api_token: ${{ secrets.DOKPLOY_AUTH_TOKEN }}
application_id: ${{ secrets.DOKPLOY_COMPOSE_ID }}
dokploy_url: ${{ secrets.DOKPLOY_URL }}
service_type: compose