-
Notifications
You must be signed in to change notification settings - Fork 3
47 lines (41 loc) · 1.11 KB
/
rw-nomad-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
name: Nomad Deploy
# Deploys a new version on Nomad.
on:
workflow_call:
inputs:
environment:
description: The GitHub environment to deploy to
required: true
type: string
service:
description: Name of the service to deploy
required: true
type: string
url:
description: URL of the deployment
required: true
type: string
version:
description: New version of the service to deploy
required: true
type: string
secrets:
NOMAD_SERVICE_KEY:
description: Secret key to deploy services
required: true
concurrency:
group: nomad-deploy-${{ inputs.service }}
jobs:
deploy:
runs-on: ubuntu-latest
name: Deploy
environment:
name: ${{ inputs.environment }}
url: ${{ inputs.url }}
steps:
- name: Deploy
run: |
curl --fail -L -s -N -X POST \
-H "Content-Type: application/json" \
-d '{"version":"${{ inputs.version }}"}' \
https://nomad-service.openttd.org/deploy/${{ inputs.service }}/${{ secrets.NOMAD_SERVICE_KEY }}