Skip to content
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 Actions #98

Closed
lorenzleutgeb opened this issue Nov 11, 2019 · 1 comment · Fixed by #99
Closed

GitHub Actions #98

lorenzleutgeb opened this issue Nov 11, 2019 · 1 comment · Fixed by #99

Comments

@lorenzleutgeb
Copy link

lorenzleutgeb commented Nov 11, 2019

This plugin does not recognize if it is being run inside GitHub Actions and will therefore hit the following case:

} else {
return new ServiceInfo(
serviceName: env['CI_NAME'] ?: 'other',
serviceNumber: env['CI_BUILD_NUMBER'],
serviceBuildUrl: env['CI_BUILD_URL'],
serviceBranch: env['CI_BRANCH'],
servicePullRequest: env['CI_PULL_REQUEST'],
repoToken: env['COVERALLS_REPO_TOKEN']
)
}

For a start, consider the following two docs:

For example, to check for GitHub Actions, you can use:

private static boolean envIsGithubActions(Map<String, String> env) {
   env.get('GITHUB_ACTIONS') == 'true'
}

To get more information, especially about associated PRs, you will have to inspect the file pointed at by the envvar GITHUB_EVENT_PATH, like here: https://github.com/actions/toolkit/blob/99d3ad0a6473e7e7906681627a450150a772ee1d/packages/github/src/context.ts#L24-L29

@musketyr
Copy link
Contributor

musketyr commented Dec 6, 2019

BTW I have scraped the values for the ENV variables for my own (currently abandoned) project but it might get handy for implementing GitHub Actions support:

https://github.com/agorapulse/ci/tree/master/src/test/resources/com/agorapulse/ci/GithubActionsSpec

Some of the values required might be located inside the event's payload (see the JSON files)

musketyr added a commit to musketyr/coveralls-gradle-plugin that referenced this issue Dec 11, 2019
fixes kt3k#98

upgraded JGit as applying the plugin is breaking couple of other plugins
@kt3k kt3k closed this as completed in #99 Dec 11, 2019
kt3k pushed a commit that referenced this issue Dec 11, 2019
fixes #98

upgraded JGit as applying the plugin is breaking couple of other plugins
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants