From 2ccf302b694fb197009c49e4bd31ab3051cfe4cc Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Sun, 17 Feb 2019 15:30:24 +0800 Subject: [PATCH] feat: support GitHub Action. --- main.go | 8 +++++++- plugin.go | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index d30be05..d2d5cb4 100644 --- a/main.go +++ b/main.go @@ -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"), diff --git a/plugin.go b/plugin.go index 9251b39..0d09482 100644 --- a/plugin.go +++ b/plugin.go @@ -22,6 +22,7 @@ type ( // Commit information. Commit struct { Sha string + Ref string Branch string Link string Author string