Fix: Add Makefile routine to run and stop the server #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release to staging | |
on: | |
push: | |
branches: | |
- main | |
# Environment variables available to all jobs and steps in this workflow | |
env: | |
GKE_PROJECT: ${{ secrets.GKE_PROJECT_JENKINS }} | |
GKE_EMAIL: ${{ secrets.GKE_EMAIL_JENKINS }} | |
GITHUB_SHA: ${{ github.sha }} | |
jobs: | |
setup-build-publish-deploy: | |
name: Setup, Build, Publish, and Deploy | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Get the version | |
id: get_version | |
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} | |
# Setup gcloud CLI | |
- uses: google-github-actions/setup-gcloud@v0 | |
with: | |
version: "270.0.0" | |
service_account_email: ${{ secrets.GKE_EMAIL_JENKINS }} | |
service_account_key: ${{ secrets.GKE_KEY_JENKINS }} | |
# Setup kubectl | |
- uses: ThomasKliszowski/setup-kubectl@v1 | |
with: | |
kube-config: ${{ secrets.KUBE_CONFIG_DATA }} | |
kube-version: 1.25.4 | |
# Configure docker to use the gcloud command-line tool as a credential helper | |
- run: | | |
# Set up docker to authenticate | |
# via gcloud command-line tool. | |
gcloud auth configure-docker | |
# Build, publish and deploy docker image | |
- name: Build, publish and deploy docker image | |
shell: 'script -q -e -c "bash {0}"' | |
run: | | |
make build publish deploy |