How to Access the Local .exe file into my github actions

Hi Team,

I have a scenario here like this, I have to build a .nupkg using a commandline.exe application out of my project.json file.

run |
cd c:\programe files\application
commandline.exe build project.json version 1.0.0

Unfortunately, I cannot access the commandline.exe from GitHub Actions, throwing unable to locate the file. I have tried to run using PowerShell script, javascript, etc. but no use.

I have to use the commandline.exe to build my project. Any help would be really appreciable. Thanks in advance.

1 Like

GitHub Actions do not run on your local machine, but on a runner provided by GitHub. Probably your command line tool is not installed there.

So the first step would be to find out how that command line tool came onto your machine in the first place.

If there is an installer (freely) downloadable from the net, which supports unattended installation, you could add a step to your workflow to download and install the program to the runner machine.

If it is your own executable (compiled by yourself) and you may share it, you could attach it as a release artifact to some GitHub release and download it from there onto the runner machine.

If these routes are not fruitful and it is a tool not only available for Windows, you may have a look at e.g. the Ubuntu version of it. Maybe it comes packaged with Ubuntu, so using an ubuntu-latest runner instead of a Windows runner may make it possible to run the Ubuntu version of said tool.

Looking at your sample repository, you already noticed that you can use the call command. It runs correclty, but the artifact upload failed because you used download-artifact instead of upload-artifact. And the deploy used a wrong list of arguments.

Note that you committed your deploy key directly to the Sample Repository. You can be sure that after your post, more people than you and me have looked at the repository and may have found that user key. Maybe some of them want to use it for malicious purposes.

So you should revoke the User Key now and create a new one.

To store secret things like the user key safely so that the GitHub runner can access them but readers of your repository can not, next time you can use GitHub Secrets:

1 Like

Thanks @schierlm ,

This really helps, one thing is blocking right, I can generat NuGet packages and upload to artifact and download the artifact file. But my final step is to deploy in our website, when I am doing that artifact file path is throwing an issue like below

The Path where I saved the my artifact is now unable to recognise it . any suggestion

You probably have some wrong argument order. It found the package path where it would expect a verb (like deploy or pack or upload).

Can you point me to the repo where these actions are active (and still failing)?

Hi @schierlm, you are absolutely correct. I have the missed arguments. I have corrected it and start working but unfortunately, I have encountered another issue

which I could not understand. Can you help me with that?

Hello @sukesh-dotcom,

it looks like @mickeygousset could already help you with that issue. :slight_smile:

Hi @schierlm ,

Yes, it is resolved, thanks for the input too.

Sukesh V