Skip to content

tkeburia building and deploying microservices 🚀 #18

tkeburia building and deploying microservices 🚀

tkeburia building and deploying microservices 🚀 #18

Workflow file for this run

name: Build and Deploy Microservices
run-name: ${{ github.actor }} building and deploying microservices 🚀
on:
push:
branches:
- 'main'
jobs:
build-and-push:
name: Build, push and deploy 🏗️🚀
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
- name: get google-cloud-sdk-gke-gcloud-auth-plugin
uses: cobraz/setup-gke-gcloud-auth-plugin@v1
- name: Authenticate with GCR
run: |
echo ${{ secrets.GCR_KEY }} | base64 --decode > gcr-key.json
gcloud auth activate-service-account --key-file=gcr-key.json
gcloud auth configure-docker
gcloud container clusters get-credentials platform-poc-407113-cluster --location europe-west2 --project platform-poc-407113
- uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Set short sha
id: vars
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Run Maven package and push images
run: mvn clean package -Djib.to.tags=${{ steps.vars.outputs.sha_short }}
- name: Use Helm
uses: azure/setup-helm@v1
with:
version: 'v3.13.2'
- name: run helm upgrade
run: ./helm_upgrade.sh ${{ steps.vars.outputs.sha_short }}
- run: echo "🍏 Job's status is ${{ job.status }}."