mirror of
https://github.com/lddsb/drone-dingtalk-message.git
synced 2026-06-13 18:51:40 +08:00
fix: patch for k8s missing env
This commit is contained in:
@@ -5,7 +5,7 @@ import (
|
||||
"log"
|
||||
"os"
|
||||
|
||||
_ "github.com/joho/godotenv/autoload"
|
||||
"github.com/joho/godotenv"
|
||||
"github.com/urfave/cli"
|
||||
)
|
||||
|
||||
@@ -210,6 +210,11 @@ func main() {
|
||||
},
|
||||
}
|
||||
|
||||
// kubernetes runner patch
|
||||
if _, err := os.Stat("/run/drone/env"); err == nil {
|
||||
godotenv.Overload("/run/drone/env")
|
||||
}
|
||||
|
||||
if err := app.Run(os.Args); nil != err {
|
||||
log.Println(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user