actions icon indicating copy to clipboard operation
actions copied to clipboard

[Feature Request] Pick up version from a versioning file

Open runlevel5 opened this issue 2 years ago • 1 comments

I have always been a big fan of the ability to specify a version file to pick up the correct tooling version. Here is one example of actions/setup-node:

- uses: actions/setup-node@v3
     with:
        node-version-file: '.tool-versions'

in the above example, the .tool-versions has:

nodejs 18.16.0

I would like to propose adopting this functionality to make life easier for devs who have been using asdf for picking the right pulumi version, something like this:

- uses: pulumi/actions@v4
      with:
        # pulumi-version: '3.74.0' 
        pulumi-version-file: '.tool-versions'
..

# .tool-versions
pulumi 3.74.0

runlevel5 avatar Jul 07 '23 02:07 runlevel5

I suspect we probably won't support this directly as it looks simple enough to use something like tool-versions-action to do this:

- name: Read .tool-versions
  uses: marocchino/tool-versions-action@v1
  id: versions
- uses: pulumi/actions@v4
    with:
      pulumi-version: $ {{ steps.versions.outputs.pulumi }}

But I'll leave this open to see if there's a good argument or a high demand for this.

Frassle avatar Jul 07 '23 06:07 Frassle