Skip to content

Added K8 Deployment. #23

Added K8 Deployment.

Added K8 Deployment. #23

Workflow file for this run

name: Build and Push Docker Image to Docker Hub & GHCR
on:
push:
branches:
- master
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: gautampatil1
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build Docker image
run: docker build -t gautampatil1/rezume:latest .
- name: Push Docker image to Docker Hub
run: docker push gautampatil1/rezume:latest
- name: Push Docker image to ghcr.io
run: |
docker login --username gautampatil1 --password ${{ secrets.GH_PAT }} ghcr.io
docker tag gautampatil1/rezume:latest ghcr.io/gautampatil1/rezume:latest
docker push ghcr.io/gautampatil1/rezume:latest
- name: Deploy to K8s
uses: actions-hub/kubectl@v1.28.3
env:
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
with:
args: apply -f deployment.yaml