This repository has been archived by the owner on Jul 8, 2024. It is now read-only.
Merge pull request #122 from floriaaan/feature/add-swagger-routes #110
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Delivery Microservice CI/CD | ||
on: | ||
push: | ||
branches: [ dev, main ] | ||
permissions: | ||
id-token: write | ||
contents: read | ||
jobs: | ||
deploy: | ||
Check failure on line 12 in .github/workflows/delivery-deploy.yml GitHub Actions / Deploy Delivery Microservice CI/CDInvalid workflow file
|
||
runs-on: ubuntu-latest | ||
environment: dev | ||
needs: [ build, test, publish ] | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@master | ||
- name: Install kubectl | ||
run: | | ||
sudo snap install kubectl --classic | ||
- name: 'Az CLI login' | ||
uses: azure/login@v1 | ||
with: | ||
client-id: ${{ secrets.AZURE_CLIENT_ID }} | ||
tenant-id: ${{ secrets.AZURE_TENANT_ID }} | ||
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} | ||
- name: Set up Terraform | ||
uses: hashicorp/setup-terraform@v1 | ||
with: | ||
terraform_version: 1.0.5 | ||
- name: Terraform init | ||
run: | | ||
cd ./terraform && | ||
terraform init | ||
- name: Terraform apply | ||
run: | | ||
cd ./terraform && | ||
terraform apply -auto-approve | ||
- name: Terraform apply delivery | ||
run: | | ||
cd ../services/delivery/terraform && | ||
terraform apply -auto-approve | ||
- name: Configure kubectl | ||
run: | | ||
az aks get-credentials --resource-group rg-goodfood-dev --name aks-goodfood-dev | ||
- name: apply k8s manifests | ||
run: | | ||
cd .. && | ||
kubectl create namespace goodfood && | ||
kubectlcrete kubectl apply -f ./k8s |