Skip to content

feat(docs): enhance Kafka authentication options in README for Helm c… #5

feat(docs): enhance Kafka authentication options in README for Helm c…

feat(docs): enhance Kafka authentication options in README for Helm c… #5

Workflow file for this run

name: Docker Image
on:
push:
branches:
- master
- main
tags:
- "v*.*.*"
pull_request:
branches:
- master
- main
workflow_dispatch:
permissions:
contents: read
packages: write
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
DOCKER_METADATA_SHORT_SHA_LENGTH: 8
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Read Gradle version
id: gradle-version
shell: bash
run: |
version="$(sed -n 's/^[[:space:]]*version[[:space:]]*=[[:space:]]*//p' gradle.properties | head -n 1 | tr -d '[:space:]')"
if [[ -z "$version" ]]; then
echo "Unable to find version in gradle.properties" >&2
exit 1
fi
echo "version=$version" >> "$GITHUB_OUTPUT"
- name: Log in to GHCR
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha,prefix=,format=short
type=raw,value=${{ steps.gradle-version.outputs.version }}
- name: Build and publish
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max