Skip to content

Merge pull request #9 from nlnwa/dependabot/github_actions/docker/bui… #3

Merge pull request #9 from nlnwa/dependabot/github_actions/docker/bui…

Merge pull request #9 from nlnwa/dependabot/github_actions/docker/bui… #3

Workflow file for this run

name: Release
on:
push:
branches:
- main
tags:
- "v[0-9]+.[0-9]+.[0-9]+**"
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
release:
name: Build and publish docker image
runs-on: ubuntu-latest
steps:
- name: Extract metadata (tags, labels) and establish version
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern={{version}}
type=ref,event=branch
type=ref,event=pr
- name: Log in to the container registry (${{ env.REGISTRY }})
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}