Skip to content

chore : added deployments and problems #1

chore : added deployments and problems

chore : added deployments and problems #1

name: Build and push Problems
on:
push:
branches:
- 'main'
paths:
- 'apps/problems/**'
pull_request:
branches:
- 'main'
paths:
- 'apps/problems/**'
jobs:
Deploy-sweeper:
name: Builds and pushes to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Checkout the Repository
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build Docker Image
uses: docker/build-push-action@v2
with:
context: .
file: docker/problems/Dockerfile
push: true
tags: vishal022/algoearth-problems:latest
- name: Setup Kubectl
uses: azure/k8s-set-context@v1
with:
kubeconfig: ${{ secrets.KUBE_CONFIG }}
- name: ReDeploy the Problems
run: kubectl rollout restart deployment/add-problems