Skip to content

Commit

Permalink
Add support for workflow_dispatch (#181)
Browse files Browse the repository at this point in the history
  • Loading branch information
ocean90 authored Mar 14, 2021
1 parent 6df415b commit 13c1bfc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1026,7 +1026,7 @@ function parseEnvFile(eventPath) {
* @returns {string} - Branch name
*/
function parseBranch(eventName, event) {
if (eventName === "push") {
if (eventName === "push" || eventName === "workflow_dispatch") {
return event.ref.substring(11); // Remove "refs/heads/" from start of string
}
if (eventName === "pull_request" || eventName === "pull_request_target") {
Expand Down
2 changes: 1 addition & 1 deletion src/github/context.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function parseEnvFile(eventPath) {
* @returns {string} - Branch name
*/
function parseBranch(eventName, event) {
if (eventName === "push") {
if (eventName === "push" || eventName === "workflow_dispatch") {
return event.ref.substring(11); // Remove "refs/heads/" from start of string
}
if (eventName === "pull_request" || eventName === "pull_request_target") {
Expand Down

0 comments on commit 13c1bfc

Please sign in to comment.