Skip to content

Commit 378b0e3

Browse files
authored
Merge pull request #23 from secondlife/signal/bool
Bool inputs always truthy
2 parents 6a7c949 + fb5fc81 commit 378b0e3

2 files changed

Lines changed: 17 additions & 4 deletions

File tree

.github/workflows/test.yaml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
checkout: false
3333

3434
- shell: bash
35-
run : rm -rf stage
35+
run: rm -rf stage
3636

3737
- uses: ./
3838
with:
@@ -44,3 +44,16 @@ jobs:
4444
with:
4545
autobuild-version: main
4646
checkout: false
47+
48+
# Test custom python version
49+
- uses: actions/setup-python@v4
50+
with:
51+
python-version: "3.10"
52+
- uses: ./
53+
with:
54+
setup-python: false
55+
- name: Check python version
56+
shell: bash
57+
run: |
58+
ver="$(python --version)"
59+
[[ "$ver" == "Python 3.10."* ]] || exit "Expected python 3.10, got $ver"

action.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,23 +109,23 @@ runs:
109109
110110
- name: Checkout build variables
111111
uses: actions/checkout@v3
112-
if: inputs.checkout-build-variables
112+
if: ${{ fromJSON(inputs.checkout-build-variables) }}
113113
with:
114114
repository: secondlife/build-variables
115115
ref: ${{ inputs.build-variables-ref }}
116116
path: .build-variables
117117

118118
- name: Setup python
119119
uses: actions/setup-python@v4
120-
if: inputs.setup-python
120+
if: ${{ fromJSON(inputs.setup-python) }}
121121
with:
122122
python-version: 3.x
123123

124124
- name: Setup autobuild
125125
shell: bash
126126
env:
127127
VERSION: ${{ inputs.autobuild-version }}
128-
if: inputs.setup-autobuild
128+
if: ${{ fromJSON(inputs.setup-autobuild) }}
129129
run: |
130130
if [[ $VERSION = *.*.* ]]; then
131131
pip install autobuild==$VERSION

0 commit comments

Comments
 (0)