feat: support GitHub Action.

This commit is contained in:
Bo-Yi Wu
2019-02-17 15:30:24 +08:00
parent 3936acbd84
commit 2ccf302b69
2 changed files with 8 additions and 1 deletions
+7 -1
View File
@@ -110,7 +110,12 @@ func main() {
cli.StringFlag{
Name: "commit.sha",
Usage: "git commit sha",
EnvVar: "DRONE_COMMIT_SHA",
EnvVar: "DRONE_COMMIT_SHA,GITHUB_SHA",
},
cli.StringFlag{
Name: "commit.ref",
Usage: "git commit ref",
EnvVar: "DRONE_COMMIT_REF,GITHUB_REF",
},
cli.StringFlag{
Name: "commit.branch",
@@ -210,6 +215,7 @@ func run(c *cli.Context) error {
},
Commit: Commit{
Sha: c.String("commit.sha"),
Ref: c.String("commit.ref"),
Branch: c.String("commit.branch"),
Link: c.String("commit.link"),
Author: c.String("commit.author"),
+1
View File
@@ -22,6 +22,7 @@ type (
// Commit information.
Commit struct {
Sha string
Ref string
Branch string
Link string
Author string