Skip to content

feat: protocol checkpoints route #42

feat: protocol checkpoints route

feat: protocol checkpoints route #42

Workflow file for this run

name: Develop
on:
workflow_dispatch:
push:
branches: [develop]
tags: [v*]
env:
REGISTRY: europe-west1-docker.pkg.dev
IMAGE_NAME: dropps-indexing/leequid/monitoring-app
NAMESPACE: leequid
CHART_PATH: k8s/chart
jobs:
build-and-push-image:
name: Build and Push Docker Image
runs-on: ubuntu-22.04
permissions:
contents: 'read'
id-token: 'write'
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Authenticate to Google Cloud
id: auth
uses: google-github-actions/auth@v1.1.1
with:
token_format: access_token
access_token_lifetime: 300s
workload_identity_provider: projects/597567142274/locations/global/workloadIdentityPools/dropps-github/providers/github
service_account: github@dropps-indexing.iam.gserviceaccount.com
- name: Log in to Google Artifact Registry
uses: docker/login-action@v2.2.0
with:
registry: ${{ env.REGISTRY }}
username: oauth2accesstoken
password: ${{ steps.auth.outputs.access_token }}
- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v4.6.0
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=sha,priority=1000,prefix={{date 'YYYY-MM-DDThh-mm'}}_,enable={{is_default_branch}}
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=raw,value=staging
- name: Buildx
uses: docker/setup-buildx-action@v2.7.0
- name: Build and push Docker image
uses: docker/build-push-action@v4.1.1
with:
context: .
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: ${{ steps.meta.outputs.tags }}
update-helm-chart:
name: Update Helm Chart
runs-on: ubuntu-22.04
needs: build-and-push-image
permissions:
contents: 'read'
id-token: 'write'
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Authenticate to Google Cloud
id: auth
uses: google-github-actions/auth@v1.1.1
with:
token_format: access_token
access_token_lifetime: 300s
workload_identity_provider: projects/597567142274/locations/global/workloadIdentityPools/dropps-github/providers/github
service_account: github@dropps-indexing.iam.gserviceaccount.com
- name: Authenticate with GKE (Google Kubernetes Engine)
id: 'get-credentials'
uses: 'google-github-actions/get-gke-credentials@v1'
with:
cluster_name: 'indexing-prod'
location: 'europe-west1'
- name: Install Helm
run: |
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
chmod 700 get_helm.sh
./get_helm.sh
- name: Update Helm Chart with New Image
run: |
helm upgrade --install leequid-monitoring-staging k8s/chart -f k8s/chart/values-staging.yaml -n leequid
- name: Trigger Kubernetes Rollout
run: |
kubectl rollout restart deployment/leequid-monitoring-staging -n leequid