-
Notifications
You must be signed in to change notification settings - Fork 4
51 lines (45 loc) · 1.16 KB
/
rw-entry-release-docker-nomad.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
49
50
51
name: Release (Docker + Nomad)
# A generic reusing workflow that releases a project that:
# - use Docker.
# - use Nomad.
on:
workflow_call:
inputs:
service:
description: Name of the service on Nomad
required: true
type: string
source-root:
description: Root location of the project (where Dockerfile is)
default: .
type: string
url:
description: URL of the service
required: true
type: string
secrets:
NOMAD_SERVICE_PROD_KEY:
description: Secret key to deploy the production service
required: true
concurrency:
group: release
cancel-in-progress: true
jobs:
release:
name: Release
uses: ./.github/workflows/rw-docker-build.yml
with:
source-root: ${{ inputs.source-root }}
publish: true
deploy:
needs:
- release
name: Deploy
uses: ./.github/workflows/rw-nomad-deploy.yml
secrets:
NOMAD_SERVICE_KEY: ${{ secrets.NOMAD_SERVICE_PROD_KEY }}
with:
environment: Production
service: ${{ inputs.service }}
url: ${{ inputs.url }}
version: "@sha256:${{ needs.release.outputs.digest }}"