Skip to content

fix: Dockerfile port protocol (#53) #18

fix: Dockerfile port protocol (#53)

fix: Dockerfile port protocol (#53) #18

name: Docker Publish
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
# From https://docs.github.com/en/actions/publishing-packages/publishing-docker-images
jobs:
docker-publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
- name: Build and push ( if on main ) Docker image
uses: docker/build-push-action@v5
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}