You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
More possibility for the developer to override an Action's version, add additional properties, check that the version is valid.
Currently the release of GitHub actions and of the github-actions-kotlin-dsl library are too tightly coupled.
Do you have an example usage?
Given an action like this one:
data class CreateBranchV2(
val branch: String? = null,
val sha: String? = null,
) : Action("peterjgrainger", "action-create-branch", "v2.0.0") {
}
I would like to be able to specify a specific version
val action = CreateBranchV2(branch = "main").withVersion("v2.1.0")
It may be the case the this release added two new parameters fast and nice who is not yet supported and I don't want to wait for a release of github-actions-kotlin-dsl.
I would then like to be able to specify an untyped map of additional Yaml Properties
val action = CreateBranchV2(branch = "main")
.withVersion("v2.1.0")
.withAdditionalYaml("fast" to "true", "nice" to "yes please")
An issue with this is that it's easy to specify a wrong version and waste too much time on the CI.
It would be nice if the .withVersion("v2.1.0") does check that the release actually exists
jmfayard
changed the title
[Core feature request] Checking and overriding Action versions
[Core feature request] Overriding Action versions and additional Yaml properties
Feb 8, 2022
Let's remember about updating the docs. I think a whole chapter on using custom attributes/inputs should be created, something that will answer "some feature is not yet in the library - what can I do as a workaround?".
Allows using an input that the library is not yet aware of, or passing any non-string value as string.
Co-authored-by: Piotr Krzemiński <git@krzeminski.it>
What feature do you need?
More possibility for the developer to override an Action's version, add additional properties, check that the version is valid.
Currently the release of GitHub actions and of the github-actions-kotlin-dsl library are too tightly coupled.
Do you have an example usage?
Given an action like this one:
I would like to be able to specify a specific version
It may be the case the this release added two new parameters
fast
andnice
who is not yet supported and I don't want to wait for a release of github-actions-kotlin-dsl.I would then like to be able to specify an untyped map of additional Yaml Properties
An issue with this is that it's easy to specify a wrong version and waste too much time on the CI.
It would be nice if the
.withVersion("v2.1.0")
does check that the release actually existsThat can be done with either a request like this:
curl -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/peterjgrainger/action-create-branch/releases
or
curl --location --head 'https://github.com/peterjgrainger/action-create-branch/releases/tag/v2.1.0'
It would be nice to cache the result that a given release exists, so that we pay the network penalty only once.
The text was updated successfully, but these errors were encountered: