Skip to content

Update publish-ghcr.yml #8

Update publish-ghcr.yml

Update publish-ghcr.yml #8

name: Build and Push Docker Image to DockerHub
on:
push:
branches: [ "main" ] # Workflow triggers on push to the main branch
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build the Docker image
run: docker build -t surajkumar00/portfolio .
- name: Push the Docker image to DockerHub
run: docker push surajkumar00/portfolio