Skip to content

build(deps): bump maven.surefire.plugin.version from 3.2.5 to 3.5.2 #376

build(deps): bump maven.surefire.plugin.version from 3.2.5 to 3.5.2

build(deps): bump maven.surefire.plugin.version from 3.2.5 to 3.5.2 #376

#
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) StreamThoughts
#
# Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
#
name: Docker Builds & Push
on:
push:
branches:
- 'master'
tags:
- 'v*'
env:
JAVA_VERSION: '11'
JAVA_DISTRO: 'zulu'
jobs:
build:
if: github.repository == 'streamthoughts/kafka-connect-file-pulse'
name: 'Build Docker Image'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- name: 'Set Docker Image Build-Args'
run: |
echo "VERSION=$(./mvnw org.apache.maven.plugins:maven-help-plugin:3.1.0:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
echo "GIT_BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
echo "GIT_COMMIT=$(git rev-parse --short "$GITHUB_SHA")" >> $GITHUB_ENV
echo "CREATED=$(date --rfc-3339=seconds)" >> $GITHUB_ENV
- name: 'Set up Java'
uses: actions/setup-java@v3
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DISTRO }}
cache: 'maven'
- name: 'Build with Maven'
run: |
chmod +x mvnw
./mvnw -ntp -B --file pom.xml -Pall,dist package -DskipTests
- name: 'Copy distribution'
run: cp ./connect-file-pulse-plugin/target/components/packages/streamthoughts-kafka-connect-file-pulse-${{ env.VERSION }}.zip ./docker/ \
- name: 'Login to DockerHub'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: 'Set Docker Image Tag (Master)'
if: github.ref_name == 'master'
run: echo "DOCKER_TAG=master" >> $GITHUB_ENV
- name: 'Set Docker Image Tag'
if: startsWith(github.ref, 'refs/tags/v')
run: echo "DOCKER_TAG=${{ env.VERSION }}" >> $GITHUB_ENV
- name: 'Login to DockerHub'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: 'Build & Push to Docker Hub'
uses: docker/build-push-action@v6
with:
context: docker
platforms: linux/amd64,linux/arm64
file: docker/Dockerfile
no-cache: true
push: true
tags: streamthoughts/kafka-connect-file-pulse:${{ env.DOCKER_TAG }}
build-args: |
VERSION=${{ env.VERSION }}
COMMIT=${{ env.GIT_COMMIT }}
BRANCH=${{ env.GIT_BRANCH }}
CREATED=${{ env.CREATED }}
- name: 'Build & Push to Docker Hub (Latest)'
if: startsWith(github.ref, 'refs/tags/v')
uses: docker/build-push-action@v6
with:
context: docker
platforms: linux/amd64,linux/arm64
file: docker/Dockerfile
no-cache: true
push: true
tags: streamthoughts/kafka-connect-file-pulse:latest
build-args: |
VERSION=${{ env.VERSION }}
COMMIT=${{ env.GIT_COMMIT }}
BRANCH=${{ env.GIT_BRANCH }}
CREATED=${{ env.CREATED }}