-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting "Error: Expects non-primitive" when using multiple multiline fields #122
Comments
Hello @darkxeno The action is sensible to indentations in - uses: Wandalen/[email protected]
with:
action: docker/build-push-action@v3
attempt_limit: 2
attempt_delay: 2000
with: |
file: ./Dockerfile
tags: ***.dkr.ecr.us-east-1.amazonaws.com/IMAGE_NAME:8771665,***.dkr.ecr.us-east-1.amazonaws.com/IMAGE_NAME:latest
context: ./.
load: true
push: false
cache-from: type=registry,ref=***.dkr.ecr.us-east-1.amazonaws.com/IMAGE_NAME:latest
cache-to: type=inline
ssh: |
build-args: |
*** Take care about indentations in field Also, I fixed line with: |
file: ./Dockerfile` |
Thanks for the fast response @dmvict What i pasted above was obtained from the github action logs. This is what i was using on the pipelines yaml, i think this is correctly indented.
Thanks for the support. |
Hello @darkxeno Yes, the inputs seems to be correct. Please, check that all inputs are singleline or update indentations for multiline inputs. For example, if your build-args input is
Then the input will be formatted as build-args: |
--arg1 arg
--arg2 arg but the actions expects that the second line has same indentation as the first one (or bigger). |
i think i get your point, as we are using | as part of a string, its probably not indenting multiline strings automatically? the values of build-args is original constructed like this on the input of the custom action:
and after that provided as the variable ${{ inputs.build_args }} to this action So you mean if i some force the correct indentation to all lines should be working properly? Thanks again @dmvict |
Hello @darkxeno I think it should work. The best way is to create experimental workflow with public data and hardcoded values. |
I'm getting the same issue - here is what I'm using in the workflow: - name: Build image
uses: Wandalen/[email protected]
with:
action: docker/build-push-action@v3
with: |
context: .
target: ${{ inputs.build-target }}
file: ${{ inputs.dockerfile }} And here's what shows in the github actions log output as what is being passed to the Wandalen/wretry.action action: Run Wandalen/[email protected]_js_action
with:
action: docker/build-push-action@v3
with: context: .
target: release
file: docker/Dockerfile.backend So somehow there is a problem with indentation. I have also tried an extra set of indentation after the first line in the - name: Build image
uses: Wandalen/[email protected]
with:
action: docker/build-push-action@v3
with: |
context: .
target: ${{ inputs.build-target }}
file: ${{ inputs.dockerfile }} I think there is a bug in the action code somewhere. |
Hello @mycarrysun I hope I'll find a time to check and fix the issue. |
Hello @dmvict. I am trying to use this action and am getting the same error. I tried to make a PR to add this action to universal blue's build process at ublue-os/main#503 and I am seeing this "Error: Expects non-primitive" issue. |
This seems related to the amount of left indenting on a multi-line string. |
Hello @dylanmtaylor Yes, the indentations are important. |
Hello @dylanmtaylor @mycarrysun @darkxeno Can you try new version of the action? I improved a parser a time ago. |
Hello @mycarrysun Thank you for report. Please, open new issue for the error. I'll try to find a time to solve it. |
Example inputs used, gathered from github action logs:
Error:
Error: Expects non-primitive
The same error happens on the post run step.
Using the same action
docker/build-push-action@v3
without "Wandalen/[email protected]" works as expected.Any idea about what could be wrong? somehow seem to only be happening with multiline fields.
The text was updated successfully, but these errors were encountered: