Skip to content

ci: set up publishing docker image #1

ci: set up publishing docker image

ci: set up publishing docker image #1

name: Docker Build and Push
on:
push:
branches: ["**"]
pull_request:
branches: ["**"]
# Uncomment below to only run on tags (releases)
# push:
# tags: ["v*"]
permissions:
contents: read
packages: write
jobs:
docker:
name: Build and Push Docker Image
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Login to GitHub Container Registry
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
with:
context: .
push: true
tags: ghcr.io/${{ github.repository }}:latest