All checks were successful
Build and Publish Docker Image / build-and-push (push) Successful in 1m34s
47 lines
1.3 KiB
YAML
47 lines
1.3 KiB
YAML
name: Build and Publish Docker Image
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "*.*.*"
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build-and-push:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Docker meta
|
|
id: meta
|
|
uses: docker/metadata-action@v5
|
|
with:
|
|
images: ${{ secrets.REGISTRY }}/${{ secrets.USERNAME }}/ktvmanager-backend-python
|
|
tags: |
|
|
type=semver,pattern={{version}}
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Login to Docker Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ secrets.REGISTRY }}
|
|
username: ${{ secrets.USERNAME }}
|
|
password: ${{ secrets.PASSWORD }}
|
|
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
push: true
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
no-cache: true
|
|
labels: |
|
|
org.opencontainers.image.version=${{ steps.meta.outputs.version }}
|
|
org.opencontainers.image.title=ktvmanager-backend-python
|
|
org.opencontainers.image.description=ktvmanager-backend-python
|
|
build-args: |
|
|
VERSION=${{ steps.meta.outputs.version }}
|