Skip to content
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

Documentation for "list" types is incorrect #1316

Closed
3 tasks done
coreyti opened this issue Feb 8, 2025 · 2 comments
Closed
3 tasks done

Documentation for "list" types is incorrect #1316

coreyti opened this issue Feb 8, 2025 · 2 comments

Comments

@coreyti
Copy link

coreyti commented Feb 8, 2025

Contributing guidelines

I've found a bug, and:

  • The documentation does not mention anything about my problem
  • There are no open or closed issues that are related to my problem

Description

First, thank you for providing this wonderful resource for the community!

Now, I want to point out that the documentation on the README is not correct in that "types" listed as "lists" are not actually YAML lists; instead they are YAML multi-line strings. This might seem like a pedantic nitpick, but it took me some time today to realize what I was doing wrong.

For example, if the builld-args input was actually a list, one might write something like:

with:
  build-args:
    - ARG1: VALUE1
    - ARG2: VALUE2

when, in fact what would be required is:

with:
  build-args: |
    ARG1=VALUE1
    ARG2=VALUE2

The latter (correct usage) is not a YAML "list".

Expected behaviour

The README documentation should not indicate that something is a "ist" when in fact it is a (multi-line) string.

Actual behaviour

When attempting to specify values for fields such as build-args as a list, per the documentation, one will receive an error along the lines of "A sequence was not expected".

Repository URL

No response

Workflow run URL

No response

YAML workflow

# failure:

  uses: docker/build-push-action@v6
  with:
    build-args:
      - REVISION: "${{ steps.determine_tag.outputs.revision }}"

# success:

  uses: docker/build-push-action@v6
  with:
    build-args: |
      REVISION="${{ steps.determine_tag.outputs.revision }}"

Workflow logs

No response

BuildKit logs


Additional info

No response

@coreyti
Copy link
Author

coreyti commented Feb 8, 2025

I know see that the README states the following:

List type is a newline-delimited string

So, perhaps that should be sufficient (?). When I read that the "type" of something that is written in language X, I tend to expect that type to be what the language defines. So, I found this to be surprising.

@coreyti coreyti closed this as completed Feb 8, 2025
@lucasoares
Copy link

Took me a while to understand that too. I think it should not use the name "list" haha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants