Skip to content

[maven-release-plugin] prepare release objectmorph-0.0.30 #11

[maven-release-plugin] prepare release objectmorph-0.0.30

[maven-release-plugin] prepare release objectmorph-0.0.30 #11

# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Java CI with Maven to create and publish Docker image
on:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven
server-id: github
- name: Print settings xml
run: |
$LocalMavenM2Dir = "$env:USERPROFILE\.m2\"
type $LocalMavenM2Dir\settings.xml
- name: Sleep for 90 seconds - Let caller workflow to release the artifact
run: sleep 90s
shell: bash
- name: Create docker image and push to docker hub (latest version)
run: |
echo $RELEASE_VERSION
echo ${{ env.RELEASE_VERSION }}
cd objectmorph-app
mvn -B spring-boot:build-image --file pom.xml
docker tag ennahdi/objectmorph-app:env.RELEASE_VERSION ennahdi/objectmorph-app
docker push ennahdi/objectmorph-app
docker tag ennahdi/objectmorph-app:env.RELEASE_VERSION ennahdi/objectmorph-app:env.RELEASE_VERSION
docker push ennahdi/objectmorph-app:env.RELEASE_VERSION
env:
GITHUB_ACTOR: mohamed-ennahdi
GITHUB_TOKEN: ${{ secrets.ENNAHDI_TOKEN }}