Skip to content

StuartHarris building and deploying Rust microservices 🚀 #79

StuartHarris building and deploying Rust microservices 🚀

StuartHarris building and deploying Rust microservices 🚀 #79

name: Build and Deploy Rust Microservices
run-name: ${{ github.actor }} building and deploying Rust microservices 🚀
on:
push:
branches:
- "main"
paths:
- "rust-containers-k8s/**"
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- "main"
paths:
- "rust-containers-k8s/**"
jobs:
build-and-push:
if: github.event.pull_request.draft == false
name: Build, push and deploy 🏗️🚀
runs-on: ubuntu-latest
defaults:
run:
working-directory: rust-containers-k8s
steps:
- name: Check out repository code
uses: actions/checkout@v4
# - 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_RUST }} | base64 --decode > gcr-key.json
# gcloud auth activate-service-account --key-file=gcr-key.json
# gcloud auth configure-docker europe-west2-docker.pkg.dev
# gcloud container clusters get-credentials platform-poc-rust-cluster --location europe-west2 --project platform-poc-rust
# - name: Build and push Docker images
# run: ./scripts/build_and_push.sh
- name: Build Docker images
run: ./scripts/build.sh
# - name: Set short sha
# id: vars
# run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
# - name: run helm upgrade
# run: ./scripts/helm_upgrade.sh ${{ steps.vars.outputs.sha_short }}