Skip to content

Fix CI pipeline to use maven multi-module setup #46

Fix CI pipeline to use maven multi-module setup

Fix CI pipeline to use maven multi-module setup #46

Workflow file for this run

name: build and push docker image
on:
push:
branches:
- main
paths-ignore:
- '**.md'
jobs:
dockerhub:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: check out parent
uses: actions/checkout@v4
with:
repository: t2-project/microservices
submodules: true
- name: Ensure to use latest versions
run: |
git submodule update --init --recursive
git submodule update --recursive --remote
- name: Set up jdk
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: 'maven'
- name: Maven build
run: |
chmod +x mvnw
./mvnw --projects order --also-make clean install
- run: |
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Docker build and push (manual)
run: |
echo ${{ env.RELEASE_VERSION }}
cd order
docker build -t t2project/order:${{ env.RELEASE_VERSION }} .
docker push t2project/order:${{ env.RELEASE_VERSION }}