-
Notifications
You must be signed in to change notification settings - Fork 4
/
action.yml
53 lines (52 loc) · 2.14 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: "dbt Cloud Cancel Running CI Job Runs Action"
description: "Checks if a dbt cloud CI job is running after a new/updated PR is made, cancels stale runs to kick of the new CI job run"
branding:
icon: "cloud"
color: "orange"
author: "Steve Dowling (contributor: Thomas Monnier)"
inputs:
dbt_cloud_token:
description: dbt Cloud API token
required: true
dbt_cloud_account_id:
description: dbt Cloud account ID
required: true
dbt_cloud_job_id:
description: dbt Cloud Job ID
required: true
dbt_cloud_host:
description: the host url used for the dbt Cloud account, by default cloud.getdbt.com is used
required: false
default: "cloud.getdbt.com"
only_cancel_run_if_commit_is_using_pr_branch:
description: "A flag that can be set to True or False. If set to true the action will only cancel runs that are based on the same pr"
required: false
default: false
github_pr_number:
description: PR number - required if only_cancel_run_if_commit_is_using_pr_branch is set to true
required: false
max_runs:
description: maximum number of recent runs to retrieve
required: false
default: "10"
only_cancel_queued_starting_run:
description: if set to true, this will only cancel runs in the state of Queued or Starting
required: false
default: false
cancel_runs_based_on_schema_override:
description: |
if this and `only_cancel_run_if_commit_is_using_pr_branch` are both set to true,
the action will parse the PR number from existing dbt Cloud runs based on their `schema_override`,
which is expected to follow the format `dbt_cloud_pr_{dbt_cloud_job_id}_{github_pr_number}` (matching dbt Cloud CI).
required: false
default: false
outputs:
cancelled_jobs_flag:
description: "Returns True if a job or jobs was cancelled, False is no jobs were cancelled"
cancelled_dbt_cloud_job_runs:
description: "Returns the cancelled job run ids in a list e.g. ['12345', '56789']"
cancelled_dbt_cloud_job_runs_markdown:
description: "Pre-Scripted markdown containing info on the cancelled jobs, can be used in PR comments"
runs:
using: "docker"
image: "Dockerfile"