Skip to content

Commit

Permalink
chore(workflows): Change Workflow Inputs to Boolean (#292)
Browse files Browse the repository at this point in the history
PR: #292
  • Loading branch information
osama-salman99 authored Sep 7, 2023
1 parent d9b3d7a commit 853d359
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/generator-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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' }}
6 changes: 3 additions & 3 deletions .github/workflows/generator-publish-artifact.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 853d359

Please sign in to comment.