Generalize Kafka code into BrokerClient/BrokerConnection (#7) #12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Vanilla Docker Container | |
on: | |
push: | |
paths: | |
- vanilla/** | |
branches: | |
- main | |
env: | |
WORKING_DIRECTORY: ${{ github.workspace }}/vanilla | |
CONTAINER_REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository_owner }}/vanilla | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
defaults: | |
run: | |
working-directory: ${{ env.WORKING_DIRECTORY }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- uses: gradle/wrapper-validation-action@v1 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Log into Container registry | |
if: github.event_name != 'pull_request' | |
uses: docker/login-action@v2 | |
with: | |
registry: ${{ env.CONTAINER_REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract Docker metadata | |
uses: docker/metadata-action@v4 | |
id: meta | |
with: | |
images: ${{ env.CONTAINER_REGISTRY }}/${{ env.IMAGE_NAME }} | |
tags: | | |
type=sha,prefix= | |
labels: | | |
org.opencontainers.image.title=vanilla | |
org.opencontainers.image.description=The central cluster manager for Beemo. | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: ${{ env.WORKING_DIRECTORY }}/Dockerfile | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} |