Skip to content

Commit cf7e239

Browse files
committed
Coerce strings into booleans
1 parent 3fbd4a4 commit cf7e239

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

action.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,11 @@ runs:
8181
- uses: actions/checkout@v2
8282

8383
- name: Check input requirements
84-
if: inputs.push_image && inputs.registry_url && inputs.registry_user && ! inputs.registry_pass
84+
if: >-
85+
fromJSON(inputs.push_image)
86+
&& ( ! inputs.registry_url
87+
|| ! inputs.registry_user
88+
|| ! inputs.registry_pass)
8589
shell: bash
8690
run: |
8791
echo "::error ::'push_image' specified but missing 'registry_url', 'registry_user', or 'registry_pass'"
@@ -129,7 +133,7 @@ runs:
129133
uses: docker/setup-buildx-action@v1
130134

131135
- name: Container Registry Login
132-
if: inputs.push_image
136+
if: fromJSON(inputs.push_image)
133137
uses: docker/login-action@v1
134138
with:
135139
registry: ${{ inputs.registry_url }}
@@ -139,7 +143,7 @@ runs:
139143
- name: Build and push Docker images
140144
uses: docker/[email protected]
141145
with:
142-
push: ${{ inputs.push_image }}
146+
push: ${{ fromJSon(inputs.push_image) }}
143147
context: ${{ inputs.context }}
144148
build-args: |
145149
BASE_YUM_REPO=${{ inputs.osg_repo }}
@@ -150,7 +154,7 @@ runs:
150154
cache-to: type=local,dest=/tmp/.buildx-cache,mode=max
151155

152156
- name: Cache Docker images
153-
if: inputs.cache_image
157+
if: fromJSON(inputs.cache_image)
154158
uses: actions/cache@v2
155159
with:
156160
path: /tmp/.buildx-cache

0 commit comments

Comments
 (0)