Skip to content

Commit

Permalink
adding workflow for dev/production deploys
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick-codetogether committed Nov 20, 2024
1 parent 13393b1 commit 8f40f50
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/portal-dev-deploy.yml
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
31 changes: 31 additions & 0 deletions .github/workflows/portal-production-deploy.yml
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

0 comments on commit 8f40f50

Please sign in to comment.