fix: gcr workflow is updated. #12
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 | |
on: | |
push: | |
branches: | |
- '**' # This triggers on every push to any branch | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Log in to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.PAT_TOKEN }} # Use your Personal Access Token here | |
- name: Build the Docker image | |
run: | | |
docker build . -t ghcr.io/suraj-kumar00/portfolio:latest | |
- name: Push the Docker image | |
run: | | |
docker push ghcr.io/suraj-kumar00/portfolio:latest |