Skip to content

chore(release): version packages #62

chore(release): version packages

chore(release): version packages #62

name: Build and Publish Docker
on:
push:
tags:
- deemix-webui@*
pull_request:
branches:
- main
paths:
- webui/CHANGELOG.md
- .github/workflows/build-publish-docker.yml
concurrency: ${{ github.workflow }}-${{ github.ref }}
env:
HUSKY: 0
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-publish-docker:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=match,pattern=\d+\.\d+\.\d+,prefix=v
- name: Build and push Docker image
id: push
uses: docker/build-push-action@v6
with:
context: .
cache-from: type=gha
cache-to: type=gha,mode=max
push: ${{ startsWith(github.ref, 'refs/tags/') }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}