mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-10-15 19:42:06 +00:00
skip unsupported platforms
Signed-off-by: Casey Lee <cplee@nektos.com>
This commit is contained in:
parent
b8589c4e9b
commit
12ac03a755
6 changed files with 23 additions and 14 deletions
|
@ -24,15 +24,16 @@ import (
|
|||
|
||||
// RunContext contains info about current job
|
||||
type RunContext struct {
|
||||
Config *Config
|
||||
Matrix map[string]interface{}
|
||||
Run *model.Run
|
||||
EventJSON string
|
||||
Env map[string]string
|
||||
Tempdir string
|
||||
ExtraPath []string
|
||||
CurrentStep string
|
||||
StepResults map[string]*stepResult
|
||||
Config *Config
|
||||
Matrix map[string]interface{}
|
||||
Run *model.Run
|
||||
EventJSON string
|
||||
Env map[string]string
|
||||
Tempdir string
|
||||
ExtraPath []string
|
||||
CurrentStep string
|
||||
StepResults map[string]*stepResult
|
||||
PlatformName string
|
||||
}
|
||||
|
||||
type stepResult struct {
|
||||
|
@ -55,6 +56,10 @@ func (rc *RunContext) Close(ctx context.Context) error {
|
|||
|
||||
// Executor returns a pipeline executor for all the steps in the job
|
||||
func (rc *RunContext) Executor() common.Executor {
|
||||
if img := platformImage(rc.PlatformName); img == "" {
|
||||
return common.NewInfoExecutor(" \U0001F6A7 Skipping unsupported platform '%s'", rc.PlatformName)
|
||||
}
|
||||
|
||||
err := rc.setupTempDir()
|
||||
if err != nil {
|
||||
return common.NewErrorExecutor(err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue