-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (71 loc) · 2.03 KB
/
deploy.yml
File metadata and controls
75 lines (71 loc) · 2.03 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
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
scale-after:
required: false
type: string
default: ""
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@v4
- 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 }}"
echo "scale-after=${{ inputs.scale-after }}"
- name: Deploy to cluster
uses: kitconcept/docker-stack-deploy@1cd6c45b8147a0084cb1468dc5f28481eb4a0087
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
scale_after: ${{ inputs.scale-after }}