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.

The CI environment variable is not set in GitHub Actions

See original GitHub issue

Describe the bug

The CI environment variable is not set in GitHub Actions. A lot of software relies on that to detect whether it’s running in CI. Example: https://github.com/jruby/jruby/issues/6113#issuecomment-596196601

Area for Triage:

Question, Bug, or Feature?: Feature

Virtual environments affected

  • macOS 10.15
  • Ubuntu 16.04 LTS
  • Ubuntu 18.04 LTS
  • Windows Server 2016 R2
  • Windows Server 2019

Expected behavior The environment variable CI should be set to true, as it is in most CI solutions out there (e.g., TravisCI).

Actual behavior It’s not set: https://github.com/ruby/setup-ruby/runs/493307400?check_suite_focus=true

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

5reactions
TingluoHuangcommented, Mar 13, 2020

GitHub action is not only a CI system, the workflow run can be triggered on any GitHub event, like Issue create/comment, so I am not sure setting CI=true is appropriate for those scenarios. 😄

@chrispat to comment on this.

4reactions
TingluoHuangcommented, Apr 13, 2020

shipped as part of the 2.168.0 runner.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Variables - GitHub Docs
Because default environment variables are set by GitHub and not defined in a workflow, they are not accessible through the env context. However,...
Read more >
Environment variable in GitHub Actions not interpolated ...
It is not supported at the moment, to have env variable inside env. The docs on env mentions it: variables in the env...
Read more >
GitHub Action fails with "The GITHUB_TOKEN environment ...
GitHub Action fails with “The GITHUB_TOKEN environment variable was not set”. This post was most recently updated on August 31st, 2022.
Read more >
How to use GitHub Actions environment variables
This hands-on article discusses the environment variables available within GitHub Actions and when we should use them.
Read more >
Recommended ways to catch missing environment ...
The application was deployed with a GitHub action. ... The environment variable was simply not set in GitHub's secrets. This was not caught ......
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