-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (76 loc) · 2.53 KB
/
deploy.yaml
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
78
name: deploy
on:
deployment
jobs:
deploy:
runs-on: ubuntu-latest
steps:
-
uses: chrnorm/deployment-status@releases/v2
with:
deployment-id: ${{ github.event.deployment.id }}
description: Trigger the pipeline
state: "queued"
token: "${{ github.token }}"
-
uses: chrnorm/deployment-status@releases/v2
with:
deployment-id: ${{ github.event.deployment.id }}
description: Start to deploy to the Kubernetes
log-url: https://gitploy.jp.ngrok.io/applications/${{ github.event.deployment.payload.application }}
state: "in_progress"
token: "${{ github.token }}"
-
name: Log in
uses: clowdhaus/argo-cd-action/@main
with:
version: 2.3.3
command: login gitploy.jp.ngrok.io
options: >
--username
admin
--password
${{ secrets.ARGOCD_PASSWORD }}
-
name: Set image tag
uses: clowdhaus/argo-cd-action/@main
with:
version: 2.3.3
command: app set ${{ github.event.deployment.payload.application }}
options: >
--revision ${{ github.sha }}
--kustomize-image gitployio/argocd-demo=gitployio/argocd-demo:sha-${{ github.sha }}
-
name: Sync
uses: clowdhaus/argo-cd-action/@main
with:
version: 2.3.3
command: app sync ${{ github.event.deployment.payload.application }}
options: --timeout 300
-
name: Wait
uses: clowdhaus/argo-cd-action/@main
with:
version: 2.3.3
command: app wait ${{ github.event.deployment.payload.application }}
options: >
--health
--timeout 600
-
if: success()
uses: chrnorm/deployment-status@releases/v2
with:
deployment-id: ${{ github.event.deployment.id }}
description: Finish to deploy successfully.
log-url: https://gitploy.jp.ngrok.io/applications/${{ github.event.deployment.payload.application }}
state: "success"
token: "${{ github.token }}"
-
if: failure()
uses: chrnorm/deployment-status@releases/v2
with:
deployment-id: ${{ github.event.deployment.id }}
description: Failed to deploy.
log-url: https://gitploy.jp.ngrok.io/applications/${{ github.event.deployment.payload.application }}
state: "failure"
token: "${{ github.token }}"