ci_env 0.5.2

Detect CI information from the environment.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use crate::api::{CiEnvironment, CiProvider};
use crate::github;

// https://forgejo.org/docs/latest/user/actions/reference/
// Forgejo Actions mirrors every `FORGEJO_*` variable as `GITHUB_*` for
// GitHub Actions compatibility, and sets `FORGEJO_ACTIONS=true`
pub fn create_environment() -> CiEnvironment {
    CiEnvironment {
        provider: CiProvider::ForgejoActions,
        ..github::create_environment()
    }
}