Skip to content

Commit

Permalink
Logging depcated usage
Browse files Browse the repository at this point in the history
  • Loading branch information
whywaita committed May 13, 2024
1 parent aed29c8 commit c55c5d7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/config/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ func LoadWithDefault() Conf {
if mwt == ModeWebhookTypeUnknown {
log.Panicf("%s is invalid webhook type", os.Getenv(EnvModeWebhookType))
}

if mwt == ModeWebhookTypeCheckRun {
log.Println("WARNING: check_run is deprecated mode and will delete it. Please use workflow_job")
}

c.ModeWebhookType = mwt
}

Expand Down
1 change: 1 addition & 0 deletions pkg/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ func GetRunnerTemporaryMode(runnerVersion string) (string, TemporaryMode, error)
}

if ephemeralSupportVersion.GreaterThan(inputVersion) {
logger.Logf(false, "WARNING: runner version is lower than v2.282.0, use --once mode. It's deprecated. will be removed in future.")
return runnerVersion, TemporaryOnce, nil
}
return runnerVersion, TemporaryEphemeral, nil
Expand Down

0 comments on commit c55c5d7

Please sign in to comment.