generated from Greenstand/treetracker-microservice-template
-
Notifications
You must be signed in to change notification settings - Fork 8
33 lines (30 loc) · 1.18 KB
/
treetracker-api-deploy-prod.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
name: Deploy Service to Prod Env
on:
workflow_dispatch:
inputs:
environment:
description: 'git-tag'
required: true
env:
project-directory: ./
jobs:
deploy-test:
name: Deploy latest to prod environment, requires approval
runs-on: ubuntu-latest
if: |
github.repository == "Greenstand/${{ github.event.repository.name }}"
steps:
- uses: actions/checkout@v2
- 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/overlays/production && ../../../kustomize edit set image greenstand/${{ github.event.repository.name }}:${{ github.event.inputs.environment }})
- name: Commit prod kustomization file with new app version
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git commit -am "chore: bump docker image tag ${{ github.event.inputs.environment }})} [skip ci]"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}