Skip to content

How to run .bat file in the repository #26690

Discussion options

You must be logged in to vote
neo-mashiro:

I thought ${{env.GITHUB_WORKSPACE}} is my current working directory, but it is not, I also tried to print out ${{env.GITHUB_WORKSPACE}} and .\ , but the ls -a command always returns empty on both powershell and bash shell, what am I missing here?

The thing you’re missing here is that each job in your workflow gets a fresh VM, with a fresh filesystem, and thus a fresh (empty) workspace. Your checkout job retrieves the repository data and ends, then the runner VM is discarded, and with it the repository data. So each job that works with your repository data will need to contain an actions/checkout step of its own.

The best solution for your workflow above is to put all the…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Actions Build, test, and automate your deployment pipeline with world-class CI/CD Product Feedback
2 participants