Skip to content

Commit

Permalink
Add environment variables to signal feature and version to the CLI
Browse files Browse the repository at this point in the history
This PR ensures environment variables are set before any invocation of
the CLI.  Here is a list of vars that are set:

github/codeql-core#1124 (comment)

This ensures the CLI knows the features and versions of the containing
actions/runner.

Additionally:

- Fix the user agent so that it more closely aligns with user agent
  spec
- Refactor environment variable initialization so that it all happens in
  one place and call.
- Move Mode, getRequiredEnvParam, setMode, getMode out of actions-util
  and into util. actions-util is meant for utils only called by the
  action, not the runner.

The `prepareLocalRunEnvironment()` method is most likely deprecated and
should be removed. I originally added it because I had a way of working
where I would run the action from my local machine to test out changes,
but this was always a little flaky. So, I no longer use this way of
working. I will probably remove it soon.
  • Loading branch information
aeisenberg committed Jun 2, 2021
1 parent 539d968 commit 3708898
Show file tree
Hide file tree
Showing 48 changed files with 387 additions and 250 deletions.
80 changes: 17 additions & 63 deletions lib/actions-util.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3708898

Please sign in to comment.