-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: George J Padayatti <[email protected]>
- Loading branch information
1 parent
a88018c
commit fd43dee
Showing
2 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
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 |
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