stevedow99/dbt Cloud Cancel Running CI Job Runs Action
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
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| dbt_cloud_token | dbt Cloud API token | yes | — |
| dbt_cloud_account_id | dbt Cloud account ID | yes | — |
| dbt_cloud_job_id | dbt Cloud Job ID | yes | — |
| dbt_cloud_host | the host url used for the dbt Cloud account, by default cloud.getdbt.com is used | no | cloud.getdbt.com |
| only_cancel_run_if_commit_is_using_pr_branch | 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 | no | false |
| github_pr_number | PR number - required if only_cancel_run_if_commit_is_using_pr_branch is set to true | no | — |
| max_runs | maximum number of recent runs to retrieve | no | 10 |
| only_cancel_queued_starting_run | if set to true, this will only cancel runs in the state of Queued or Starting | no | false |
| cancel_runs_based_on_schema_override | 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). | no | false |
Outputs
| name | description |
|---|---|
| cancelled_jobs_flag | Returns True if a job or jobs was cancelled, False is no jobs were cancelled |
| cancelled_dbt_cloud_job_runs | Returns the cancelled job run ids in a list e.g. ['12345', '56789'] |
| cancelled_dbt_cloud_job_runs_markdown | Pre-Scripted markdown containing info on the cancelled jobs, can be used in PR comments |