This action executes a project maven build, docker build and push (if enabled).
| parameter | required | default | description |
|---|---|---|---|
| github-token | true | Github authorization token | |
| java-type | true | ‘openjdk’ | deprecated (1), (2) |
| java-version | true | ‘21’ | Java version |
| java-description | true | ‘corretto’ | Java distribution |
| maven-version | true | ‘3.9.6’ | Maven version |
| maven-options | true | ‘-B clean package’ | Maven goals and options |
| node-version | true | ‘20’ | Node version |
| docker-context | true | ’.’ | Docker context |
| docker-file | true | ‘Dockerfile’ | Docker file |
| docker-tags | true | ‘latest’ | Comma separated image tags |
| docker-platforms | true | ‘linux/amd64’ | Comma separated platforms |
| dockerhub-username | false | Docker hub username (3) | |
| dockerhub-password | false | Docker hub password (3) |
Aside project versions there is a floating stable tag available : mcp
# CI with maven container publish
#
# version 1.0.0
name: CI maven container publish latest
on:
# Trigger analysis when pushing in master or pull requests, and when creating
# a pull request.
push:
branches:
- main
- develop
- branch-preview
- 1-action-for-maven-build-container-build-and-publish
pull_request:
types:
- opened
- synchronize
- reopened
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: fugerit-org/psychic-actions/maven-container-publish@mcp
with:
github-token: $
java-type: 'native'
java-version: '22-ea'
java-distribution: 'graalvm'
docker-file: 'src/test/docker/Dockerfile.jvm'