Skip to content

fix: kafka container health check #145

fix: kafka container health check

fix: kafka container health check #145

Workflow file for this run

name: Docker build using matrix
on:
pull_request:
branches: [ "main" ]
jobs:
test:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
matrix:
projects: [
"subscriptions_holder", "t_coubs_initiator", "coub_smart_searcher",
"kafka_message_producer", "kafka_message_consumer", "telegram_bot"
]
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: gradle
- name: tests
run: gradle ${{ matrix.projects }}:clean ${{ matrix.projects }}:test
build:
needs: [ test ]
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
matrix:
docker-file: [ "coub_smart_searcher",
"kafka_message_consumer",
"kafka_message_producer",
"spring_eureka_registry",
"spring_gateway",
"subscriptions_holder",
"t_coubs_initiator",
"coub_forwarder_telegram_bot"
]
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: gradle
- name: Retrieve Version
run: echo "VERSION_NAME=$(${{ github.workspace }}/gradlew -q printVersion)" >> "$GITHUB_OUTPUT"
id: project_version
- name: Get version
run: echo "version_name=${{steps.project_version.outputs.VERSION_NAME}}" >> "$GITHUB_ENV"
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
# https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions#using-secrets-in-a-workflow
# Except GITHUB_TOKEN,
# secrets are not passed to the runner when
# a workflow is triggered from a forked repository.
- name: docker build
uses: docker/build-push-action@v6
with:
context: .
build-args: |
JAR_VERSION=${{ env.version_name }}
file: ./Dockerfile.${{ matrix.docker-file }}
platforms: linux/amd64,linux/arm64
tags: ${{ secrets.DOCKERHUB_USERNAME || 'docker.io' }}/${{ matrix.docker-file }}:${{ env.version_name }}
push: false