Skip to content

Docker Build and Publish #11

Docker Build and Publish

Docker Build and Publish #11

name: Docker Build and Publish
#
# Docker image tagging strategy:
#
# Release tags (v1.0.0): {version}, latest
# Release candidates (v1.0.0-rc1): {version}, next
# Branches (feature/x): {branch-name}
#
# This ensures stable releases are tagged as 'latest' while release candidates
# are tagged as 'next' for early testing. Branch builds get descriptive tags.
#
on:
push:
tags: [ "v*" ]
pull_request:
types: [closed]
branches: [ "develop", "feature/*", "rel/*" ]
workflow_dispatch:
permissions:
contents: read
packages: write
jobs:
build-and-publish-main:
uses: ./.github/workflows/.docker-build-publish-reusable.yml
with:
image-suffix: ''
dockerfile: 'Dockerfile'
image_tags: |
type=ref,event=branch
type=ref,event=tag
type=raw,value=next,enable=${{ contains(github.ref, '-rc') }}
secrets: inherit
build-and-publish-lite:
needs: [build-and-publish-main]
uses: ./.github/workflows/.docker-build-publish-reusable.yml
with:
image-suffix: '-lite'
dockerfile: 'Dockerfile-lite'
image_tags: |
type=ref,event=branch
type=ref,event=tag
type=raw,value=next,enable=${{ contains(github.ref, '-rc') }}
secrets: inherit