Describe the enhancement
It would be great to have some function or expression to read file content (readFile or contents).
Something like {{ contents('.nvmrc') }}
Code Snippet
uses: setup-node@v1
with:
node-version: {{ contents('.nvmrc') }}
Additional information
We already have functions that works with FileSystem, for example hashFiles.
Introducing contents command will bring benefits to a bunch of 1st party actions.
A few examples:
It doesn't make much sense to implement this logic in every action. It would be great to have ability to read files via simple expression:
uses: setup-java@v1
with:
java-version: {{ contents('.java-version') }}
uses: setup-node@v1
with:
node-version: {{ contents('.nvmrc') }}
Describe the enhancement
It would be great to have some function or expression to read file content (
readFileorcontents).Something like
{{ contents('.nvmrc') }}Code Snippet
Additional information
We already have functions that works with FileSystem, for example
hashFiles.Introducing
contentscommand will bring benefits to a bunch of 1st party actions.A few examples:
.nvmrcin setup-node: Support .nvmrc setup-node#32.node-versionin setup-node: Feature request: Support .node-version to specify the version setup-node#206.java-versionfile in setup-java: .java-version file support setup-java#113It doesn't make much sense to implement this logic in every action. It would be great to have ability to read files via simple expression: