Fix deploy-java.yml workflow

This commit is contained in:
Mathias Wagner
2024-07-21 15:56:50 +02:00
parent a77b49a3cb
commit 9008d3e2ec

View File

@ -39,13 +39,13 @@ jobs:
git fetch origin main git fetch origin main
LAST_VERSION=$(git show origin/main:integrations/java/pom.xml | grep -m1 '<version>' | sed -E 's/.*<version>([^<]+)<\/version>.*/\1/') LAST_VERSION=$(git show origin/main:integrations/java/pom.xml | grep -m1 '<version>' | sed -E 's/.*<version>([^<]+)<\/version>.*/\1/')
echo "LAST_VERSION: $LAST_VERSION" echo "LAST_VERSION: $LAST_VERSION"
if [ "$LAST_VERSION" == "$VERSION" ]; then if [ -z "$LAST_VERSION" ] || [ "$LAST_VERSION" == "$VERSION" ]; then
echo "Version did not change. Exiting..." echo "Version did not change or no previous version found. Skipping deployment."
exit 0 exit 0
fi fi
- name: Build and deploy - name: Build and deploy
if: steps.version_check.outputs.VERSION != steps.get_version.outputs.VERSION if: steps.version_check.outputs.LAST_VERSION != steps.get_version.outputs.VERSION || steps.version_check.outputs.LAST_VERSION == ""
run: | run: |
mvn -f integrations/java/pom.xml deploy \ mvn -f integrations/java/pom.xml deploy \
-DskipTests \ -DskipTests \