cache
cache copied to clipboard
replace deprecated set-output command
Replace all reference to deprecated set-output
command ::set-output name= ...
in the README, the examples file
and theTests
workflow. #953
Previous Test run failed because the different syntax needed for windows to read the GITHUB_OUTPUT
so instead of introducing a new step, something like the snippet bellow, I just evaluate the npm cache directory directly in the path
input
- name: Determine npm cache directory windows
if: runner.os == 'Windows'
run: echo "dir=$(npm config get cache)" >> $env:GITHUB_OUTPUT
- name: Determine npm cache directory non-windows
if: runner.os != 'Windows'
run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT
The docs don't seem to suggest such difference. @rentziass is this difference in behaviour across Windows and Linux expected?
Previous Test run failed because the different syntax needed for windows to read the
GITHUB_OUTPUT
so instead of introducing a new step, something like the snippet bellow, I just evaluate the npm cache directory directly in thepath
input- name: Determine npm cache directory windows if: runner.os == 'Windows' run: echo "dir=$(npm config get cache)" >> $env:GITHUB_OUTPUT - name: Determine npm cache directory non-windows if: runner.os != 'Windows' run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT
Hey @bishal-pdMSFT 👋 yeah it's there but you need to switch from Bash to PowerShell at the very top of the page :)
you need to switch from Bash to PowerShell at the very top of the page
@rentziass at top of page?? Do you mean to use pwsh
as shell?
The composer docs work correctly.
Hi there, another choice via here
Use
defaults
to create amap
of default settings that will apply to all jobs in the workflow.
Placed the following yml
for the workflow,
defaults:
run:
shell: bash
An full example can be found here
Hopes it may helpful.
Intuitively I would expect that by using context to access the environment I will be able abstract away those differences >> ${{ env.GITHUB_OUTPUT }}
but if I remember correctly it doesn't work :)
Anyway this isn't really the subject of this pr. Hi, @tiwarishub can you please take a look? is there anything else needed for this to merge?