From 853d359072dd99c975790ba5bbfb719eecb21801 Mon Sep 17 00:00:00 2001 From: Osama Salman Date: Thu, 7 Sep 2023 16:36:40 +0300 Subject: [PATCH] chore(workflows): Change Workflow Inputs to Boolean (#292) PR: https://github.com/ExpediaGroup/openworld-sdk-java/pull/292 --- .github/workflows/generator-main.yaml | 13 +++++-------- .github/workflows/generator-publish-artifact.yaml | 6 +++--- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/workflows/generator-main.yaml b/.github/workflows/generator-main.yaml index 991f2c287..c3adc42e0 100644 --- a/.github/workflows/generator-main.yaml +++ b/.github/workflows/generator-main.yaml @@ -17,13 +17,10 @@ on: required: true type: string production_release: - description: 'Release to production? (Yes/No)' + description: 'Release to production' required: true - type: choice - options: - - 'Yes' - - 'No' - default: 'No' + type: boolean + default: false jobs: download_specs: uses: ./.github/workflows/generator-download-specs.yaml @@ -41,7 +38,7 @@ jobs: name: ${{ github.event.inputs.name }} version: ${{ github.event.inputs.version }} publish_sources: - if: ${{ github.event.inputs.production_release }} + if: ${{ github.event.inputs.production_release == 'true' }} needs: [ generate ] uses: ./.github/workflows/generator-publish-sources.yaml with: @@ -52,4 +49,4 @@ jobs: uses: ./.github/workflows/generator-publish-artifact.yaml secrets: inherit with: - production_release: ${{ github.event.inputs.production_release }} + production_release: ${{ github.event.inputs.production_release == 'true' }} diff --git a/.github/workflows/generator-publish-artifact.yaml b/.github/workflows/generator-publish-artifact.yaml index 4288a9ad4..4183126cb 100644 --- a/.github/workflows/generator-publish-artifact.yaml +++ b/.github/workflows/generator-publish-artifact.yaml @@ -3,8 +3,8 @@ on: workflow_call: inputs: production_release: - description: 'Release to Production? (Yes/No)' - type: string + description: 'Release to Production' + type: boolean required: true jobs: publish: @@ -35,7 +35,7 @@ jobs: GPG_PASSPHRASE: ${{ secrets.GPG_PRIVATE_KEY_PASSPHRASE }} run: | cd generator/sdk - if [[ "${{github.event.inputs.production_release}}" == "Yes" ]]; then + if [[ "${{github.event.inputs.production_release}}" == "true" ]]; then mvn deploy --settings $GITHUB_WORKSPACE/settings.xml -B -U -P release -DskipTests=true else VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)