Skip to content

Commit

Permalink
Add CI/CD workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
levaitamas committed Oct 6, 2024
1 parent e5eabfb commit dbc824e
Showing 1 changed file with 68 additions and 0 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/deploy-gke.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Build and Deploy to GKE

on:
workflow_dispatch:
push:
branches:
- '*'

env:
GKE_CLUSTER: webrtc-observer
GKE_ZONE: us-east1

jobs:
setup-build-publish-deploy:
name: Setup, Build, Publish, and Deploy
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4


- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_TOKEN }}

- name: Build images
run: |-
cd webapp
docker build docker.io/levaitamas/webrtc-observer-webapp
--build-arg host="wss://webrtc-observer.org:9081" \
.
cd ../media-server
docker build docker.io/levaitamas/webrtc-observer-mediaserver
.
- name: Publish
run: |-
docker push docker.io/levaitamas/webrtc-observer-webapp
docker push docker.io/levaitamas/webrtc-observer-mediaserver
- name: Authenticate on GKE
id: auth
uses: google-github-actions/auth@v2
with:
credentials_json: '${{ secrets.GKE_SA_KEY }}'

- name: Get GKE Credentials
id: get-credentials
uses: 'google-github-actions/get-gke-credentials@v2'
with:
cluster_name: ${{ env.GKE_CLUSTER }}
location: ${{ env.GKE_ZONE }}

- name: Set up Helm
uses: azure/setup-helm@v4

- run: |
kubectl get nodes -o wide
# - name: Deploy on GKE
# run: |
# helm install webrtc-observer-org charts/webrtc-observer-org \
# --set webapp.image="" \
# --set mediaserver.image="" \

0 comments on commit dbc824e

Please sign in to comment.