-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (65 loc) · 1.81 KB
/
Copy pathdeploy.yml
File metadata and controls
69 lines (65 loc) · 1.81 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
name: Deploy project
on:
workflow_call:
inputs:
registry:
required: true
type: string
username:
required: true
type: string
tag:
required: true
type: string
environment:
required: true
type: string
stack-name:
required: true
type: string
stack-file:
required: true
type: string
secrets:
password:
required: true
remote-host:
required: true
remote-port:
required: true
remote-user:
required: true
remote-private-key:
required: true
env-file:
required: false
jobs:
deploy:
runs-on: ubuntu-latest
environment: ${{ inputs.environment }}
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Test vars
run: |
echo "tag=${{ inputs.tag }}"
echo "environment=${{ inputs.environment }}"
echo "registry=${{ inputs.registry }}"
echo "username=${{ inputs.username }}"
echo "stack_file=${{ inputs.stack-file }}"
echo "stack_name=${{ inputs.stack-name }}"
- name: Deploy to cluster
uses: kitconcept/docker-stack-deploy@v1.5.0
with:
registry: ${{ inputs.registry }}
username: ${{ inputs.username }}
password: ${{ secrets.password }}
remote_host: ${{ secrets.remote-host }}
remote_port: ${{ secrets.remote-port }}
remote_user: ${{ secrets.remote-user }}
remote_private_key: ${{ secrets.remote-private-key }}
stack_file: ${{ inputs.stack-file }}
stack_name: ${{ inputs.stack-name }}
stack_param: ${{ inputs.tag }}
env_file: ${{ secrets.env-file }}
deploy_timeout: 480