-
Notifications
You must be signed in to change notification settings - Fork 71
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
feat: add option pulumi-version-file
#1204
Conversation
Similar to how [Setup Node](https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md?rgh-link-date=2024-06-24T19%3A12%3A42Z#node-version-file) action works, this adds a new `pulumi-version-file` option that allows users to specify a file to read the version from. A lot of our providers use the `.pulumi.version` file to store the current version of pulumi and we want to be able to use that version rather than relying on what is already installed. re pulumi/ci-mgmt#990
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.
Love it!
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.
Do we want to document this option in the readme as well?
src/config.ts
Outdated
@@ -22,9 +23,20 @@ export const installationConfig = rt.Record({ | |||
export type InstallationConfig = rt.Static<typeof installationConfig>; | |||
|
|||
export function makeInstallationConfig(): rt.Result<InstallationConfig> { | |||
let pulumiVersion = getInput('pulumi-version') || '^3'; |
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 we error out early if both pulumi-version
and pulumi-version-file
are given?
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.
Good call! I'll update it.
pulumi-version-file
pulumi-version-file
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.
Nice, thank you!
Update the changelog for a minor release including #1204
Update the changelog for a minor release including #1204
The pulumi-version-file option was introduced in #1204. However it was only introduced for installation mode, not if a pulumi command is given. The latter has separate config parsing code, so let's introduce the same option there as well.
* make pulumi-version-file also work in non-install mode The pulumi-version-file option was introduced in #1204. However it was only introduced for installation mode, not if a pulumi command is given. The latter has separate config parsing code, so let's introduce the same option there as well.
Similar to how Setup
Node action works, this adds a new
pulumi-version-file
option that allows users to specify a file to read the version from.A lot of our providers use the
.pulumi.version
file to store the current version of pulumi and we want to be able to use that version rather than relying on what is already installed.re pulumi/ci-mgmt#990