-
Notifications
You must be signed in to change notification settings - Fork 118
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
attribute to enable/disable images #193
Conversation
README.md
Outdated
Extended attributes and default values: | ||
|
||
```yaml | ||
tags: | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this supposed to be images
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes good catch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be good
for (const field of fields) { | ||
const parts = field | ||
.toString() | ||
.split('=') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think splitting by =
makes something like this invalid
name=lucacome/test-foo2,enable=${{ github.event_name == 'pull_request' }}
not sure if you ever meant for it to be supported and I guess I could always have the same condition with other operators like startsWith
without using =
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
${{ github.event_name == 'pull_request' }}
is interpreted upstream by the GitHub Runner logic so it would produce name=lucacome/test-foo2,enable=<true|false>
before being passed to the action.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah interesting, I thought that was the cause for Error: Image name attribute empty: enable=true
that I'm seeing, but then I'm not sure I understand what this error means 😄
I have this and I assumed it wasn't coming from the first one, as it would get the default enable=true
, and that it was the second line causing the error.
images: |
name=lucacome/test-foo
name=lucacome/test-foo2,enable=${{ github.event_name == 'pull_request' }}
name=ghcr.io/lucacome/workflows,enable=${{ startsWith(github.ref, 'refs/tags/') && contains(matrix.target, 'aws') }}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh sounds like a bug then, will take a look, thanks for your feedback
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lucacome Hum I was not able to repro, do you have a link to your repo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@crazy-max I have this repo where I test workflows https://github.com/lucacome/workflows/runs/6178399824?check_suite_focus=true
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lucacome Should be fixed, let me know if it looks good to you. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 🚀
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
fixes #159
Signed-off-by: CrazyMax crazy-max@users.noreply.github.com