fix: build issue in workflow #1
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: | |
- main # Change this to your default branch if needed | |
pull_request: | |
branches: | |
- main # Change this to your default branch if needed | |
jobs: | |
build_and_push: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v2 | |
- name: Log in to GitHub Container Registry | |
run: echo "${{ secrets.CR_PAT }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin | |
- name: Build the Docker image | |
run: | | |
docker build . -t ghcr.io/${{ github.repository }}/gnome-nepal-backend:latest | |
- name: Push the Docker image | |
run: | | |
docker push ghcr.io/${{ github.repository }}/gnome-nepal-backend:latest |