summaryrefslogtreecommitdiffstats
path: root/pkg/runner/run_context.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/runner/run_context.go')
-rw-r--r--pkg/runner/run_context.go13
1 files changed, 10 insertions, 3 deletions
diff --git a/pkg/runner/run_context.go b/pkg/runner/run_context.go
index 158d8f6..971765a 100644
--- a/pkg/runner/run_context.go
+++ b/pkg/runner/run_context.go
@@ -351,13 +351,20 @@ func (rc *RunContext) getGithubContext() *githubContext {
if !ok {
token = os.Getenv("GITHUB_TOKEN")
}
-
+ runID := rc.Config.Env["GITHUB_RUN_ID"]
+ if(runID == ""){
+ runID = "1"
+ }
+ runNumber := rc.Config.Env["GITHUB_RUN_NUMBER"]
+ if(runNumber == ""){
+ runNumber = "1"
+ }
ghc := &githubContext{
Event: make(map[string]interface{}),
EventPath: "/github/workflow/event.json",
Workflow: rc.Run.Workflow.Name,
- RunID: "1",
- RunNumber: "1",
+ RunID: runID,
+ RunNumber: runNumber,
Actor: rc.Config.Actor,
EventName: rc.Config.EventName,
Token: token,