-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (41 loc) · 1.2 KB
/
_deploy.yml
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
name: Deploy
on:
workflow_dispatch:
workflow_call:
secrets:
DISCORD_WEBHOOK_URL:
required: true
NEW_RELIC_DEPLOYMENT_ENTITY_GUID:
required: true
NEW_RELIC_API_KEY:
required: true
jobs:
notify:
runs-on: self-hosted
steps:
- uses: axatol/actions/send-deployment-notification@release
with:
webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }}
status: pending
deploy:
needs: notify
runs-on: self-hosted
environment: production
steps:
- uses: axatol/actions/rollout-kubernetes-deployment@release
with:
namespace: huisheng
deployment-name: huisheng
- name: Create deployment marker
if: success()
uses: axatol/actions/create-newrelic-deployment@release
with:
api-key: ${{ secrets.NEW_RELIC_API_KEY }}
guid: ${{ secrets.NEW_RELIC_DEPLOYMENT_ENTITY_GUID }}
deployment-type: ROLLING
- name: Notify deployment complete
if: success() || failure()
uses: axatol/actions/send-deployment-notification@release
with:
webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }}
status: ${{ job.status }}