-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #58 from MarshallWace/actions
BuildPublishDocker workflow file
- Loading branch information
Showing
3 changed files
with
72 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
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 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM eclipse-temurin:21-jdk-ubi9-minimal | ||
|
||
# install some packages | ||
RUN INSTALL_PKGS="findutils net-tools" \ | ||
&& microdnf install -y $INSTALL_PKGS \ | ||
&& rpm -V $INSTALL_PKGS \ | ||
&& microdnf clean all -y | ||
|
||
# building, testing, packaging | ||
COPY . /usr/src/app | ||
WORKDIR /usr/src/app | ||
RUN ./gradlew build | ||
|
||
ENTRYPOINT ["java", "-jar", "kafkakewl-deploy/build/libs/kafkakewl-deploy-all.jar"] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM eclipse-temurin:21-jdk-ubi9-minimal | ||
|
||
# install some packages | ||
RUN INSTALL_PKGS="findutils net-tools" \ | ||
&& microdnf install -y $INSTALL_PKGS \ | ||
&& rpm -V $INSTALL_PKGS \ | ||
&& microdnf clean all -y | ||
|
||
# building, testing, packaging | ||
COPY . /usr/src/app | ||
WORKDIR /usr/src/app | ||
RUN ./gradlew build | ||
|
||
ENTRYPOINT ["java", "-jar", "kafkakewl-metrics/build/libs/kafkakewl-metrics-all.jar"] |