-
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.
adding workflow for dev/production deploys
- Loading branch information
1 parent
13393b1
commit 8f40f50
Showing
2 changed files
with
67 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,36 @@ | ||
name: Release Charts | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- charts/portal/** | ||
|
||
jobs: | ||
release: | ||
# depending on default permission settings for your org (contents being read-only or read-write for workloads), you will have to add permissions | ||
# see: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token | ||
permissions: | ||
contents: write | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: charts/portal | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up kubectl | ||
uses: azure/k8s-set-context@v1 | ||
with: | ||
kubeconfig: ${{ secrets.DEV_KUBE_CONFIG }} | ||
|
||
- name: Install Helm | ||
uses: azure/setup-helm@v3 | ||
|
||
- name: deploy portal to dev | ||
run: | | ||
helm upgrade portal portal -n portal -f portal/values.yaml -f portal/environments/dev.yaml |
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,31 @@ | ||
name: Deploy to Production | ||
|
||
# on: | ||
# push: | ||
# branches: | ||
# - main | ||
|
||
env: | ||
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }} | ||
DOCKER_REGISTRY: your-registry | ||
DOCKER_IMAGE: your-app | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up kubectl | ||
uses: azure/k8s-set-context@v1 | ||
with: | ||
kubeconfig: ${{ secrets.PRODUCTION_KUBE_CONFIG }} | ||
|
||
- name: Install Helm | ||
uses: azure/setup-helm@v3 | ||
with: | ||
version: 'v3.12.0' | ||
|
||
- name: Deploy to production | ||
run: | | ||
helm upgrade portal portal -n portal -f portal/values.yaml -f portal/environments/production.yaml |