Skip to content

Also build and push docker containers on git tags (#11) #7

Also build and push docker containers on git tags (#11)

Also build and push docker containers on git tags (#11) #7

name: Docker Publish
on:
push:
branches: ["main"]
tags: ["*"]
jobs:
docker-build:
runs-on: ubuntu-24.04
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
steps:
- uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Docker image
run: docker build -t "${REGISTRY}/${IMAGE_NAME}:${GITHUB_REF_NAME}" .
- name: Push Docker image
run: docker push "${REGISTRY}/${IMAGE_NAME}:${GITHUB_REF_NAME}"