Skip to content

Commit

Permalink
set default values if none passed in
Browse files Browse the repository at this point in the history
  • Loading branch information
jnewton03 committed Aug 11, 2023
1 parent 0283fa7 commit 51745cc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/os-extension-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ on:
required: false
default: '["ubuntu-latest", "windows-latest"]'
type: string

env:
JAVA_INPUT: ${{ github.event.inputs.java || '[8, 11, 17, 18]' }}
OS_INPUT: ${{ github.event.inputs.os || '["ubuntu-latest", "windows-latest"]' }}

jobs:
build:
name: Build & Package
Expand Down Expand Up @@ -54,8 +59,8 @@ jobs:
strategy:
fail-fast: false
matrix:
java: ${{ fromJSON(github.event.inputs.java)}}
os: ${{ fromJSON(github.event.inputs.os)}}
java: ${{ fromJSON(env.JAVA_INPUT) }}
os: ${{ fromJSON(env.OS_INPUT) }}
name: Test Java ${{ matrix.java }} - ${{ matrix.os }}
runs-on: ${{ matrix.os }}
needs: build
Expand Down Expand Up @@ -89,4 +94,4 @@ jobs:
sonar-pr:
needs: [ unit-test ]
uses: liquibase/build-logic/.github/workflows/[email protected]
secrets: inherit
secrets: inherit
10 changes: 6 additions & 4 deletions .github/workflows/pro-extension-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ on:
inputs:
java:
description: 'Java version to test'
required: true
required: false
default: '[8, 11, 17, 18]'
type: string
os:
description: 'Operating system to test'
required: true
required: false
default: '["ubuntu-latest", "windows-latest"]'
type: string
secrets:
Expand All @@ -33,6 +33,8 @@ env:
AWS_ACCESS_KEY_ID: ${{ secrets.GHA_AWS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.GHA_AWS_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JAVA_INPUT: ${{ github.event.inputs.java || '[8, 11, 17, 18]' }}
OS_INPUT: ${{ github.event.inputs.os || '["ubuntu-latest", "windows-latest"]' }}

jobs:
build:
Expand Down Expand Up @@ -75,8 +77,8 @@ jobs:
strategy:
fail-fast: false
matrix:
java: ${{ fromJSON(github.event.inputs.java)}}
os: ${{ fromJSON(github.event.inputs.os)}}
java: ${{ fromJSON(env.JAVA_INPUT) }}
os: ${{ fromJSON(env.OS_INPUT) }}
name: Test Java ${{ matrix.java }} - ${{ matrix.os }}
runs-on: ${{ matrix.os }}
needs: build
Expand Down

0 comments on commit 51745cc

Please sign in to comment.