forked from benbristow/dokploy-deploy-action
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathaction.yml
More file actions
77 lines (75 loc) · 2.5 KB
/
Copy pathaction.yml
File metadata and controls
77 lines (75 loc) · 2.5 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
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
name: 'Dokploy Deployment'
description: 'Trigger a Dokploy deployment'
branding:
icon: 'upload-cloud'
color: 'gray-dark'
inputs:
dokploy_url:
description: 'Dokploy base URL, e.g. https://dokploy.example.com'
required: true
auth_token:
description: 'Dokploy authentication token'
required: true
application_id:
description: 'Dokploy application ID'
required: true
application_name:
description: 'Dokploy application name'
required: true
wait_for_completion:
description: 'Wait for deployment to finish (default: false)'
required: false
default: 'false'
restart:
description: 'Restart application after deployment (default: false)'
required: false
default: 'false'
debug:
description: 'Enable debug logging (default: false)'
required: false
default: 'false'
skip_deploy:
description: 'Skip deployment trigger (for testing, default: false)'
required: false
default: 'false'
deployment_type:
description: 'Deployment type: "application" or "compose" (default: application)'
required: false
default: 'application'
compose_id:
description: 'Dokploy compose ID (required when deployment_type is compose)'
required: false
compose_name:
description: 'Dokploy compose name (required when deployment_type is compose)'
required: false
runs:
using: "composite"
steps:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
cache-dependency-path: ${{ github.action_path }}/requirements.txt
- name: Install dependencies
shell: bash
run: |
pip install -q -r ${{ github.action_path }}/requirements.txt
- name: Run Dokploy deployment
shell: bash
working-directory: ${{ github.action_path }}
env:
INPUT_DOKPLOY_URL: ${{ inputs.dokploy_url }}
INPUT_AUTH_TOKEN: ${{ inputs.auth_token }}
INPUT_APPLICATION_ID: ${{ inputs.application_id }}
INPUT_APPLICATION_NAME: ${{ inputs.application_name }}
INPUT_WAIT_FOR_COMPLETION: ${{ inputs.wait_for_completion }}
INPUT_RESTART: ${{ inputs.restart || 'false' }}
INPUT_SKIP_DEPLOY: ${{ inputs.skip_deploy || 'false' }}
INPUT_DEBUG: ${{ inputs.debug || 'false' }}
INPUT_DEPLOYMENT_TYPE: ${{ inputs.deployment_type || 'application' }}
INPUT_COMPOSE_ID: ${{ inputs.compose_id }}
INPUT_COMPOSE_NAME: ${{ inputs.compose_name }}
PYTHONUNBUFFERED: 1
run: |
python3 -m src.deploy