From b6ae6125f365f3e19cd4aa7b3559b8b1f129f6b5 Mon Sep 17 00:00:00 2001 From: Marcos Tischer Vallim Date: Tue, 22 Jul 2025 02:29:47 -0300 Subject: [PATCH] ci: update workflow --- .github/workflows/cd-deploy.yml | 2 +- .github/workflows/cd-integration.yml | 2 +- .github/workflows/ci.yml | 14 -------------- 3 files changed, 2 insertions(+), 16 deletions(-) diff --git a/.github/workflows/cd-deploy.yml b/.github/workflows/cd-deploy.yml index a37cb1d..9806012 100644 --- a/.github/workflows/cd-deploy.yml +++ b/.github/workflows/cd-deploy.yml @@ -51,7 +51,7 @@ jobs: if: ${{ inputs.environment == 'release' }} name: Set output variables run: | - RELEASE_VERSION=$(mvn -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive exec:exec | grep -e '^[^\[]' | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+') + RELEASE_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout | grep -e '^[^\[]' | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+') RELEASE_TAG=v${RELEASE_VERSION} echo "release-version=$RELEASE_VERSION" >> $GITHUB_OUTPUT diff --git a/.github/workflows/cd-integration.yml b/.github/workflows/cd-integration.yml index 547a3ff..f90da16 100644 --- a/.github/workflows/cd-integration.yml +++ b/.github/workflows/cd-integration.yml @@ -32,7 +32,7 @@ jobs: - id: environment name: Set output environment passed to the reusable workflow run: | - VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout | cut -d '-' -f 1) + VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout | grep -e '^[^\[]' | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+') echo "version=$VERSION" >> $GITHUB_OUTPUT echo "target-branch=release/$VERSION" >> $GITHUB_OUTPUT diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 04eadb2..a1cdadf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,26 +20,12 @@ jobs: outputs: type: ${{ steps.environment.outputs.type }} labels: ${{ steps.environment.outputs.labels }} - target-branch: ${{ steps.environment.outputs.target-branch }} steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Set up JDK - uses: actions/setup-java@v4 - with: - java-version: 17 - distribution: "corretto" - cache: "maven" - - id: environment name: Set output environment passed to the reusable workflow run: | - VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) - echo "version=$VERSION" >> $GITHUB_OUTPUT echo "type=$TYPE" >> $GITHUB_OUTPUT echo "labels=$LABELS" >> $GITHUB_OUTPUT - echo "target-branch=release/$VERSION" >> $GITHUB_OUTPUT ci: needs: variables