Skip to content

Update main_klustr-api.yml #3

Update main_klustr-api.yml

Update main_klustr-api.yml #3

name: Build and Deploy to Azure
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push Docker image
run: |
docker build -t rushi0508/klustr-api:latest .
docker push rushi0508/klustr-api:latest
- name: Deploy to Azure Web App
uses: azure/webapps-deploy@v2
with:
app-name: MyDotnetApiApp
slot-name: production
images: rushi0508/klustr-api:latest