wemogy/Get Environment (wemogy)
Detects on which branch or Pull Request a workflow is running on and derives an environment information from that.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| github-token | GitHub Token | yes | — |
| prod-branch | Name of the branch that should result in environment 'prod' | yes | prod |
| prod-domain-prefix | Prefix to use in domains when environment is 'prod' | yes | "" |
| staging-branch | Name of the branch that should result in environment 'staging' | yes | staging |
| staging-domain-prefix | Prefix to use in domains when environment is 'staging' | yes | staging |
| dev-branch | Name of the branch that should result in environment 'dev' | yes | main |
| dev-domain-prefix | Prefix to use in domains when environment is 'dev' | yes | dev |
| pr-environment | Default environment that should be used for Pull Request deployments | yes | dev |
| pr-use-custom-environment | Should the Pull Request be deployed into a custom environment? | yes | false |
| deploy-label | Label to trigger the default deployment | yes | deploy-to-dev |
| deploy-to-custom-label | Label to trigger a deployment into a custom environment | yes | deploy-to-custom |
Outputs
| name | description |
|---|---|
| branch-name | Name of the current branch |
| exact-match | Does the current branch exactly match one of the environments? |
| is-pull-request | Is this running in context of a Pull Request? |
| is-deployment-needed | Is a deployment needed? |
| is-custom-environment | Should a custom environment be used? |
| env | The Environment this branch is targeting |
| domain-prefix | Prefix to use in domains |
| slug | Environment slug to attach as suffix to versions and resources like Kubernetes namespaces |