woodpecker-ci / woodpecker

Woodpecker is a simple, yet powerful CI/CD engine with great extensibility.
https://woodpecker-ci.org
Apache License 2.0
4.07k stars 353 forks source link

`CI_BUILD_EVENT_NUMBER` environment variable #1058

Closed JulianGro closed 2 years ago

JulianGro commented 2 years ago

Clear and concise description of the problem

On GitHub Actions we use github.event.number to get the event number. We use this event number for sorting and naming build artifacts. For example one of our artifacts could be named: overte-server-PR123-ab123cd-aarch64.tar.xz

In WoodpeckerCI there doesn't appear to be a way to get the event number. There is only a way to get the event type via CI_BUILD_EVENT

Suggested solution

For people to be able to use the event number, I would suggest an CI_BUILD_EVENT_NUMBER environment variable.

Alternative

No response

Additional context

For clarification, a github.event.number in context of a Pull Request is just the Pull Request number.

Validations

JulianGro commented 2 years ago

Feature already exists as CI_COMMIT_PULL_REQUEST