Merge pull request #58 from MarshallWace/actions #19
Workflow file for this run
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: Build and publish the docker image | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
build-and-push-image: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- image: ghcr.io/marshallwace/kafkakewl-deploy | |
dockerfile: ./Dockerfile-kafkakewl-deploy | |
- image: ghcr.io/marshallwace/kafkakewl-metrics | |
dockerfile: ./Dockerfile-kafkakewl-metrics | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Login to ghcr.io | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extracting metadata for the image | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: ${{ matrix.image }} | |
tags: | | |
type=ref,event=pr | |
type=semver,pattern={{version}} | |
- name: Build and Push tag | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: ${{ matrix.dockerfile }} | |
platforms: linux/amd64 | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
push: true |