Something seems to have broken with omitting tokens #103
-
I'm using this action, wrapped in a custom workflow that does other things. I recently updated my version from |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I just ran a run with the actions debug on, and it might be that the curseforge token ends up being |
Beta Was this translation helpful? Give feedback.
-
Sadly, there's no such thing as an input not being passed to the action. GitHub always passes some value to every input of the action. If you haven't specified any - too bad, because some Microsoft genius decided that You may not see it, because, unlike actions, GitHub itself, as the provider of these values, can distinguish between specified and unspecified inputs. Hence, it doesn't render an empty string it provided to the action, thereby just worsening the confusion for both developers and users of those actions. However, the ability to recognize when a user hasn't specify an input is crucial for many actions, including this one. So, lots of developers, like myself, employ a "trick" of defining our own special constants that we can treat as changelog-file: ${undefined} This is because Part of the problem in your case stems from the fact that you do specify the
And here goes the second part of the issue. Previously, I explicitly filtered out any falsy token values: Lines 68 to 70 in c0f30ad This part of the code has not changed. However, This is a regression on my side. I apologize for that and I will definitely fix the issue. Meanwhile, you could replace: curseforge-token: ${{ secrets.curseforge-token }} with: curseforge-token: ${{ secrets.curseforge-token || '${undefined}' }} And you should be golden! Thank you for your understanding. |
Beta Was this translation helpful? Give feedback.
Sadly, there's no such thing as an input not being passed to the action. GitHub always passes some value to every input of the action. If you haven't specified any - too bad, because some Microsoft genius decided that
null
andundefined
, both describing an "unset" value in terms of JS, are not enough - to represent a missing value, GitHub Actions use an empty string, making it impossible to distinguish between an omitted input and an explicitly provided empty string.You may not see it, because, unlike actions, GitHub itself, as the provider of these values, can distinguish between specified and unspecified …