Skip to content

Commit 26105ac

Browse files
committed
chore: Add if check for inputted variable
1 parent a965e2b commit 26105ac

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.github/workflows/dependency_compatibility_test.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
description: 'Comma-separated list of dependencies to test (Format: dep1=1.0,dep2=2.0).
1111
No input (default) will run the the upper-bound dependencies file.'
1212
required: false
13-
default: ""
13+
default: ''
1414
schedule:
1515
- cron: '0 1 * * *' # Nightly at 1am
1616

@@ -26,7 +26,9 @@ jobs:
2626
java-version: '21'
2727
distribution: 'temurin'
2828
cache: maven
29-
- run: echo 'DEPENDENCIES_LIST=${{ github.event.inputs.dependencies-list || "" }}' >> $GITHUB_ENV
29+
- name: Determine Inputted Dependencies List
30+
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.dependencies-list != '' }}
31+
run: echo "DEPENDENCIES_LIST=${{ github.event.inputs.dependencies-list }}" >> $GITHUB_ENV
3032
# Set up the for the CI
3133
- name: Install sdk-platform-java's modules
3234
# gapic-generator-java requires Java 8 and is irrelevant for this CI
@@ -36,7 +38,7 @@ jobs:
3638
- name: Perform Dependency Compatibility Testing
3739
shell: bash
3840
run: |
39-
if [[ ${{ env.DEPENDENCIES_LIST }} == "" ]]; then
41+
if [[ ${{ env.DEPENDENCIES_LIST }} == '' ]]; then
4042
./.github/scripts/test_dependency_compatibility.sh -f dependencies.txt
4143
else
4244
./.github/scripts/test_dependency_compatibility.sh -l ${{ env.DEPENDENCIES_LIST }}
@@ -58,7 +60,7 @@ jobs:
5860
- name: Perform Dependency Compatibility Testing (Showcase)
5961
shell: bash
6062
run: |
61-
if [[ ${{ env.DEPENDENCIES_LIST }} == "" ]]; then
63+
if [[ ${{ env.DEPENDENCIES_LIST }} == '' ]]; then
6264
../.github/scripts/test_dependency_compatibility.sh -f ../dependencies.txt
6365
else
6466
../.github/scripts/test_dependency_compatibility.sh -l ${{ env.DEPENDENCIES_LIST }}

0 commit comments

Comments
 (0)