question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

expose defaults: run: working-directory: as env variable?

See original GitHub issue

Recently the following was a welcome addition to the runner yaml syntax:

defaults:
  run:
    working-directory: scripts

Some repos are actually several projects/packages/gems, etc, and they may use this feature. Often, various config files would be located in the working-directory, and custom actions may be loading them.

Hence, exposing working-directory as an env variable would allow the custom actions to make use of it. At present, the setting only seems to be used by run/script actions…

NOTE: if the feature request has been agreed upon then the assignee will create an ADR. See docs/adrs/README.md

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:6
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
timharris777commented, Jun 15, 2021

I offered to do the work and submit a PR but never received confirmation from the github team if they were onboard.

1reaction
MSP-Gregcommented, May 6, 2020

working-directory is a run: specific concept

Yes, and I did double check.

My feature request is that it be exposed (readonly) so custom actions can use it. As mentioned above, Ruby world could use It for reading config files. I suspect more apps may also have the same need. Granted, custom actions are not run:, but it seemed like an odd distinction for defaults:

Read more comments on GitHub >

github_iconTop Results From Across the Web

Environment Variables in JavaScript: process.env
The environment variables are defined outside of the JavaScript execution ... PATH : directories to search in order to execute a command.
Read more >
Introduction to environment variables
Use environment variables to set up various configuration options, and keep your set-up secure with secrets, private keys, and contexts.
Read more >
Working with environment variables - GitHub Actions (Part 2)
Here is a list of default env variables in GitHub Actions. GITHUB_WORKFLOW The name of the workflow. GITHUB_RUN_ID A unique number for each...
Read more >
What is $PWD? (vs current working directory)
That depends on what you're doing. First of all, $PWD is an environment variable and pwd is a shell builtin or an actual...
Read more >
Ways to set environment variables in Compose
You can set environment variables in a service's containers with the environment attribute in your Compose file. It works in the same way...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found