forked from dadiorchen/node-mapnik-1
-
Notifications
You must be signed in to change notification settings - Fork 5
40 lines (36 loc) · 1.34 KB
/
deploy-dev.yml
File metadata and controls
40 lines (36 loc) · 1.34 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
name: Deploy to Dev Env
on:
workflow_dispatch:
inputs:
git-tag:
description: "image tag"
required: true
env:
project-directory: ./
jobs:
deploy-test:
name: Deploy latest to test environment, requires approval
runs-on: ubuntu-latest
if: |
github.repository == 'Greenstand/node-mapnik-1'
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.git-tag }}
- name: get-npm-version
id: package-version
uses: martinbeentjes/npm-get-version-action@master
with:
path: ./
- name: Install kustomize
run: curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash
- name: Run kustomize
run: (cd deployment/base && ../../kustomize edit set image greenstand/treetracker-map-tile-server:${{ steps.package-version.outputs.current-version }} )
- name: Install doctl for kubernetes
uses: digitalocean/action-doctl@v2
with:
token: ${{ secrets.DIGITALOCEAN_TOKEN }}
- name: Save DigitalOcean kubeconfig
run: doctl kubernetes cluster kubeconfig save ${{ secrets.TEST_CLUSTER_NAME }}
- name: Update kubernetes resources
run: kustomize build deployment/overlays/development | kubectl apply -n tile-server --wait -f -