fix: gcr workflow is updated. #11
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: 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 |