watson / ci-info

Get details about the current Continuous Integration environment
MIT License
321 stars 50 forks source link

Add GitHub Actions support #42

Closed ethomson closed 4 years ago

ethomson commented 5 years ago

Add support for detecting a run inside a GitHub Actions environment. This detects using the GITHUB_ACTIONS environment variable, and detects a pull request run by examining the GITHUB_EVENT_NAME environment variable, which indicates why a GitHub Actions run was started. When it is set to pull_request, we set isPR to true.

ethomson commented 5 years ago

Fixes #31

fishcharlie commented 5 years ago

Awesome!!! @watson any chance we could get this merged in?

codfish commented 5 years ago

👍

On Sun, Sep 15, 2019 at 2:43 PM Edward Thomson notifications@github.com wrote:

@ethomson commented on this pull request.

In vendors.json https://github.com/watson/ci-info/pull/42#discussion_r324475783:

@@ -73,6 +73,12 @@

 "constant": "DSARI",

 "env": "DSARI"

},

  • {

  • "name": "GitHub Actions",

  • "constant": "GITHUB_ACTIONS",

  • "env": "GITHUB_ACTIONS",

No, GITHUB_ACTION is set to the name of the action that’s running (if there is one). For example, action/setup-node@v1.

GITHUB_ACTIONS is set always. I’ll put in a PR to the docs to reflect this.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/watson/ci-info/pull/42?email_source=notifications&email_token=AAMWZ6SWNQLUHP5IBSUYMZ3QJZ63PA5CNFSM4IWCUK2KYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCEYEMCY#discussion_r324475783, or mute the thread https://github.com/notifications/unsubscribe-auth/AAMWZ6TS3D7UTANPW4C3KW3QJZ63PANCNFSM4IWCUK2A .

fearphage commented 5 years ago

@watson Is this missing anything else or can it be merged?

fishcharlie commented 4 years ago

Now that GitHub Actions is generally available (https://github.blog/changelog/2019-11-11-github-actions-is-generally-available/) can we get this merged with a new release @watson???

yordis commented 4 years ago

@watson give us some love 💘

fearphage commented 4 years ago

FYI I emailed the maintainer directly over two weeks ago. Haven't heard a peep. I'm not sure how to proceed from there.

jperl commented 4 years ago

I published a fork with this merged in case anyone needs this in the meantime. @qawolf/ci-info

fearphage commented 4 years ago

@sibiraj-s Do you still have merge access? I see you merged the last commit in the repo. We're trying to get some motion on this PR.

ethomson commented 4 years ago

Cool, thanks @sibiraj-s! Now how can we get a release shipped?

fearphage commented 4 years ago

@sibiraj-s Thank you. You're a star.

Now how can we get a release shipped?

Related: Have you seen #44?

sibiraj-s commented 4 years ago

I don't have publish access, I have notified reg this to @watson.

meanwhile i will look into other Issues/PR and get them ready so it can be published whenever possible.

For now (till the new changes are published)

npm install https://github.com/watson/ci-info.git
fearphage commented 4 years ago

I don't have publish access, I have notified reg this to @watson.

Unless you know @watson personally, that may be a dead end. This issue was code complete since 9/19. I reached out to him via email 3 months ago and twitter 1.5 months ago about this exact issue. He didn't reply to either. I honestly considered the fact that he might be dead until he retweeted his company a few days ago. I suspect he has simply lost interest in the project. I would love to see him hand the reins over to someone else, but alas here we are.

mislav commented 4 years ago

I honestly considered the fact that he might be dead until he retweeted his company a few days ago. I suspect he has simply lost interest in the project.

I don't think it's nice to say something like that. Open source projects are provided without warranties and any maintainer can step down at any time they want. It's much kinder to assume the priorities of how the maintainer spends their free time has changed.

I would love to see him hand the reins over to someone else

Speaking from a perspective of a maintainer myself, that's way easier said than done, especially for a project that has this many weekly downloads and dependents. We can't hand over a project to just anyone because we can't be sure that they don't have malicious intent with future releases, or that the new maintainer's own security & release practices match ours.

fishcharlie commented 4 years ago

@mislav I completely agree that it’s very extreme and not nice to assume the worst when people are no longer active.

That being said. GitHub provides a very simple archive feature that @watson COULD use to indicate the project is no longer being maintained. Or a simple edit to the README as well. It’s totally fair that priorities change, but maintainers should at least respect the community enough to spend 1 minute informing the community of the priority change.

fearphage commented 4 years ago

I don't think it's nice to say something like that.

@mislav Thinking someone is dead is neutral. Death is merely a state of being. I didn't wish death upon him. I said it may be the case. Humans have a tendency to die... at a rate of 100% as observed thus far.

Open source projects are provided without warranties and any maintainer can step down at any time they want. It's much kinder to assume the priorities of how the maintainer spends their free time has changed.

You are 100% correct. However even the busiest man in the world has the time to say "I don't want to support this anymore", "leave me alone", "die in a fire", or any kind of response at all honestly. I assumed the radio silence to Github, email, and Twitter meant something more sinister was at play. Since I'm unable to imagine someone that can't find under 30 seconds to type a handful words, it seemed like a much nicer assumption than to assume he was merely ignoring us all intentionally. I'm an optimist so I was assuming the best of the maintainer and that this silence was beyond his control.

sindresorhus commented 4 years ago

FYI: https://github.blog/changelog/2020-04-15-github-actions-sets-the-ci-environment-variable-to-true/

huan commented 4 years ago

I'm running GitHub Actions and want to use ci-info for it.

However, it seems that this PR has not been published to NPM yet.

Could we publish the latest code to npm for convenience?

sibiraj-s commented 3 years ago

Published v3.