Evgeny  Bovykin
Evgeny Bovykin

Reputation: 3079

GitHub actions - get absolute path to working directory

In Maven, I need to provide absolute path to a directory in my project. How can I get absolute path to the directory GitHub action is running in?

Upvotes: 48

Views: 76876

Answers (2)

Evgeny  Bovykin
Evgeny Bovykin

Reputation: 3079

As pointed out by @soltex, ${GITHUB_WORKSPACE} points to the checkout directory.

Upvotes: 57

Druckles
Druckles

Reputation: 3802

In addition to the environment variable described by @Evgeny Bovykin, you can also use the ${{ ...}} syntax with:

${{ github.workspace }}

See the documentation.

Upvotes: 30

Related Questions