-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Github Action incorrect behavior #96
Comments
How should we correctly verify if we are running on a PR? |
Not sure if there's any other way to detect without using the {
isCi: true,
name: "GitHub Actions",
service: "github",
commit: "0e16c49d52f276979dd47d0ff11d2e2f9cc2df65",
isPr: true,
branch: "master",
prBranch: "refs/pull/1/merge",
slug: "iamogbz/github-test",
root: "/home/runner/work/github-test/github-test",
pr: 1,
} Build: https://github.com/iamogbz/github-test/pull/1/checks
GITHUB_REF=refs/pull/1/merge https://github.com/pvdlg/env-ci/blob/73299d7f729971a2725cff8b582367f108cfb5ea/services/github.js#L27
GITHUB_ACTIONS=true
GITHUB_ACTION=run1 https://github.com/pvdlg/env-ci/blob/73299d7f729971a2725cff8b582367f108cfb5ea/services/github.js#L23
GITHUB_RUN_ID=90747655
GITHUB_RUN_NUMBER=6
|
We just adopted |
Bug
Github actions run from a PR do not have the correct env information.
run env-ci in a github action. The PR number is not present
this library uses
GITHUB_EVENT_NAME
https://github.com/pvdlg/env-ci/blob/master/services/github.js#L27 to check if it is a PR.Their docs say that
GITHUB_EVENT_NAME
is set topull_request
when:This variable in my action is set to
push
.Environment:
The text was updated successfully, but these errors were encountered: