Skip to content

Update dependency Meziantou.Analyzer to 2.0.172 (#553) #250

Update dependency Meziantou.Analyzer to 2.0.172 (#553)

Update dependency Meziantou.Analyzer to 2.0.172 (#553) #250

Workflow file for this run

name: Continuous Deployment
on:
push:
branches: [ main ]
workflow_dispatch:
env:
PROJECT_ID: ${{ secrets.GKE_PROJECT }}
GKE_CLUSTER: ${{ secrets.GKE_CLUSTER_NAME }}
GKE_ZONE: us-east1-b
DEPLOYMENT_NAME: coding-blog-deployment
IMAGE: coding-blog
jobs:
build-publish-deploy:
name: build, publish, and deploy
runs-on: ubuntu-latest
environment: production
steps:
- name: checkout code
id: checkout-code
uses: actions/checkout@v4
- name: πŸ” authorize gcloud
id: authorize-gcloud
uses: 'google-github-actions/auth@v2'
with:
credentials_json: ${{ secrets.GKE_SA_KEY }}
- name: ☁ setup gcloud cli
id: setup-gcloud
uses: google-github-actions/[email protected]
with:
project_id: ${{ secrets.GKE_PROJECT }}
- name: πŸ”§ configure docker
id: configure-docker
run: |-
gcloud --quiet auth configure-docker
- name: 🚒 configure kubectl
id: configure-kubectl
uses: google-github-actions/[email protected]
with:
cluster_name: ${{ env.GKE_CLUSTER }}
location: ${{ env.GKE_ZONE }}
- name: 🐳 build docker image
id: build-docker-image
run: |-
docker build -f "src/Coding.Blog/Coding.Blog/Dockerfile" \
--tag "gcr.io/$PROJECT_ID/$IMAGE" \
"src"
- name: πŸ‹ publish docker image
id: publish-docker-image
run: |-
docker push "gcr.io/$PROJECT_ID/$IMAGE"
- name: πŸš€ deploy
id: deploy
run: |-
kubectl rollout restart deployment/$DEPLOYMENT_NAME