Skip to content

fixed docker build

fixed docker build #2

Workflow file for this run

name: Build and Push Docker Image
on:
push:
branches:
- production
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Login to GitHub Container Registry
run: docker login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GHCR_PAT }}
- name: Set ghcr.io url
run: echo "REPO=${GITHUB_REPOSITORY@L}" >> "${GITHUB_ENV}"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build the Docker image
run: |
docker build . -t ghcr.io/${{ env.REPO }}:${{ github.sha }}
docker tag ghcr.io/${{ env.REPO }}:${{ github.sha }} ghcr.io/${{ env.REPO }}:latest
- name: Push the Docker image
run: |
docker push ghcr.io/${{ env.REPO }}:${{ github.sha }}
docker push ghcr.io/${{ env.REPO }}:latest