This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/airflow-cancel-workflow-runs.git

commit 6cc4a33ca01b2c5983cfec0351f4041b719eb6b4
Author: James Netherton <[email protected]>
AuthorDate: Wed May 20 15:36:21 2020 +0100

    Add workflow parameter to inputs list
---
 README.md   | 2 +-
 action.yml  | 3 +++
 src/main.ts | 2 +-
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md
index d25c46f..1448802 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,7 @@ This action cancels previous runs for one or more branches/prs 
associated with a
 
 ## Usage
 
-The easiest and most complete approach to utilize this action, is to create a 
separate schedule event triggered workflow, which is directed at the workflow 
you wish to clear duplicate runs. At each cron interrval all branches and all 
PRs executing for either push or pull_request events will be processed and 
limited to one run per branch/pr. 
+The easiest and most complete approach to utilize this action, is to create a 
separate schedule event triggered workflow, which is directed at the workflow 
you wish to clear duplicate runs. At each cron interval all branches and all 
PRs executing for either push or pull_request events will be processed and 
limited to one run per branch/pr.
 
 Additionally this action can be placed as an early step in your workflow (e.g. 
after checkout), so that it can abort the other previously running jobs 
immediately, in case most resources are tied up. Unfortunately this approach is 
a no-op when a pull request uses a fork for a source branch. This is because 
the GITHUB_TOKEN provided to runs with a fork source branch specifies reed-only 
permissions for security reasons. write permissions are required to be able to 
cancel a job. Therefore,  [...]
 
diff --git a/action.yml b/action.yml
index 79df71e..e0d9c6d 100644
--- a/action.yml
+++ b/action.yml
@@ -5,6 +5,9 @@ inputs:
   token:
     description: The GITHUB_TOKEN secret of this github workflow
     required: true
+  workflow:
+    description: The filename of the workflow to limit runs on (only applies 
to schedule events)
+    required: false
 runs:
   using: 'node12'
   main: 'dist/index.js'
diff --git a/src/main.ts b/src/main.ts
index 35ae27f..0fededf 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -45,7 +45,7 @@ async function cancelDuplicates(
 ): Promise<void> {
   const octokit = new github.GitHub(token)
 
-  // Deteermind the workflow to reduce the result set, or reference anothre 
workflow
+  // Determine the workflow to reduce the result set, or reference another 
workflow
   let resolvedId = ''
   if (workflowId === undefined) {
     const reply = await octokit.actions.getWorkflowRun({

Reply via email to