Help
cancel
Showing results forΒ 
Search instead forΒ 
Did you mean:Β 
Pilot Lvl 1
Message 1 of 2

Call Set-Output from PowerShell?

Solved! Go to Solution.

Hello All,

 

I am using the guidance provided in this very helpful and valuable article:

https://den.dev/blog/github-actions-powershell/#fnref:1

 

I got everything setup and the action is running within my workflow.

 

The problem I am now facing is... how do I call methods such as set-output and others as described here?

https://help.github.com/en/actions/automating-your-workflow-with-github-actions/development-tools-fo...

 

My Unix isn't all that good, hence the gravitation towards powershell. 😁

 

I did manage to find whereis, but it wasn't able to find the method in question:

 

Start-Process /usr/bin/whereis -ArgumentList "whereis"
Start-Process /usr/bin/whereis -ArgumentList "set-output"

whereis: /usr/bin/whereis
set-output:

 

Any further guidance would be greatly appreciated!

1 Reply
Highlighted
Solution
Pilot Lvl 1
Message 2 of 2

Re: Call Set-Output from PowerShell?

As always, it appears that I am overcomplicating things. πŸ˜†

 

I was interpreting the "::" as a special Unix command, but it's a literal string that is further used to process during task execution of subsequent workflow steps.

 

So, when the documentation states "Logging Commands" it literally means to invoke commands via logging.

 

For instance, by using the following line:

echo "::warning file=app.js,line=1,col=5::Missing semicolon"

(Found here)

 

I was able to emit the warning message:

##[warning]Missing semicolon

(Found here)

 

Hopefully this will help someone else learning the ropes here. πŸ‘