-
Notifications
You must be signed in to change notification settings - Fork 80
35 lines (32 loc) · 1.23 KB
/
treetracker-admin-api-deploy-test.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
name: Deploy Admin Panel API to Test Env
on:
workflow_dispatch:
inputs:
environment:
description: 'git-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/${{ github.event.repository.name }}"
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.tag }}
- 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/test && ../../../kustomize edit set image greenstand/treetracker-admin-api:${{ github.event.inputs.environment }})
- name: Commit test 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 }}