Skip to content

3.3.1-scala2.13-rev20 #5

3.3.1-scala2.13-rev20

3.3.1-scala2.13-rev20 #5

Workflow file for this run

# This action pushes new amd64 and arm64 docker images to the Docker and GitHub
# registries on every new release of the project.
#
# Cobbled together from these sources:
# - https://github.com/docker/build-push-action/#usage
# - https://docs.github.com/en/actions/publishing-packages/publishing-docker-images
name: Release
"on":
release:
types: [published]
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: mccutchen
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: mccutchen/kafka-lite
- name: Compute build args
id: args
# We have two build arguments to pass into the build-args argument to
# the docker/build-and-push step below, and that argument expects a
# multi-line string.
#
# Here we attempt to hack a multi-line string value into a single
# output variable following this example from GitHub's docs:
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings
run: |
echo 'build_args<<EOF' >> $GITHUB_OUTPUT
grep -e KAFKA_VERSION -e SCALA_VERSION VERSIONS >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT
- name: Build and push
uses: docker/build-push-action@v3
with:
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: ${{ steps.args.outputs.build_args }}