Skip to content

kitconcept.core - Tag #85

kitconcept.core - Tag

kitconcept.core - Tag #85

Workflow file for this run

name: 'kitconcept.core - Tag'
on:
push:
tags:
- '*'
workflow_dispatch:
jobs:
config:
name: "Config: Compute values used in workflow"
uses: ./.github/workflows/config.yml
release:
runs-on: ubuntu-latest
needs:
- config
strategy:
fail-fast: false
matrix:
include:
- image-name-suffix: "builder"
dockerfile: "backend/Dockerfile.builder"
- image-name-suffix: "prod"
dockerfile: "backend/Dockerfile.prod"
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
${{ needs.config.outputs.image-name-prefix }}-${{ matrix.image-name-suffix }}
labels: |
org.label-schema.docker.cmd=docker run -d -p 8080:8080 ${{ needs.config.outputs.image-name-prefix }}-${{ matrix.image-name-suffix }}:${{ github.ref_name }}
flavor:
latest=false
tags: |
type=ref,event=branch
type=sha
type=pep440,pattern={{version}}
type=pep440,pattern={{major}}.{{minor}}
type=pep440,pattern={{major}}
type=raw,value=${{ github.ref_name }}
type=raw,value=latest,enable={{is_default_branch}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Backend
uses: docker/build-push-action@v6
with:
platforms: linux/amd64
context: backend/
file: ${{ matrix.dockerfile }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
KC_VERSION=${{ needs.config.outputs.kc-version }}