Skip to content

Fix Dockerfile

Fix Dockerfile #6

name: Build and Publish Docker
on:
push:
branches:
- master
jobs:
build_and_push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
env:
IMAGE_NAME: rebacklogs
steps:
- name: checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:latest
ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ github.sha }}