Description
Is your feature request related to a problem? Please describe.
We use this action to output vars to other parts of our workflow, but we are having difficulty getting this action to output when switching from the current usage to the new format.
Here is the current excerpt from a workflow where we use this action. The issue is when we try to change the last line to the new format, removing "set-output". We suspect that since it's embedded inside of Node.js that it doesn't like being flipped around.
steps:
- name: "Filter workspace"
id: filter_workspace
uses: actions/github-script@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
var command = '${{ github.event.inputs.TERRAFORM_COMMAND }}'
var execute = false
if (command != 'no-op') {
var workspace = '${{ matrix.workspace }}'
execute = true
var filter = '${{ github.event.inputs.WORKSPACE_FILTER }}'
if (filter.trim().length > 0) {
var filter_array = '${{ github.event.inputs.WORKSPACE_FILTER }}'.split(',').map(function(item) {
return item.trim()
})
if (filter_array.length > 0) {
execute = false
if (filter_array.includes(workspace)) {
execute = true
}
}
}
}
console.log("::set-output name=execute::" + execute)
Here is the github documentation suggesting refactor of the set-output command.
Is there a recommended way to change this set-output command that will still work with your action? Does your action support Python? Are you aware of any that do? I know that I have not provided much more of a code reference, but it is not a public repository. What I can say is that the