Skip to content

Commit

Permalink
Update GitHubActions.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
iljadaderko authored Aug 19, 2019
1 parent eb45b22 commit 700dce7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions source/ci_source/providers/GitHubActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,13 @@ import { readFileSync, existsSync } from "fs"
*
*/

const eventFilePath = process.env.GITHUB_EVENT_PATH || "/github/workflow/event.json"

export class GitHubActions implements CISource {
private event: any

constructor(private readonly env: Env) {
if (existsSync("/github/workflow/event.json")) {
const eventFilePath = process.env.GITHUB_EVENT_PATH || "/github/workflow/event.json"
if (existsSync(eventFilePath)) {
const event = readFileSync(eventFilePath, "utf8")
this.event = JSON.parse(event)
}
Expand Down

0 comments on commit 700dce7

Please sign in to comment.