Skip to content

Commit

Permalink
Add dbt cloud API parameterization (#28)
Browse files Browse the repository at this point in the history
* Add dbt_cloud_url config key

* Add https:// prefix to api url variable
  • Loading branch information
maxpowis authored Dec 11, 2023
1 parent 08fd358 commit 191eae7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Example usage at [fal-ai/fal_bike_example](https://github.com/fal-ai/fal_bike_ex

### Credentials

- `dbt_cloud_url` - dbt Cloud [API URL](https://docs.getdbt.com/dbt-cloud/api-v2#/) (Default: `https://cloud.getdbt.com`)
- `dbt_cloud_token` - dbt Cloud [API token](https://docs.getdbt.com/docs/dbt-cloud/dbt-cloud-api/service-tokens)
- `dbt_cloud_account_id` - dbt Cloud Account ID
- `dbt_cloud_job_id` - dbt Cloud Job ID
Expand Down
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ branding:
icon: "cloud"
color: "orange"
inputs:
dbt_cloud_url:
description: dbt Cloud base API URL
required: false
default: https://cloud.getdbt.com
dbt_cloud_token:
description: dbt Cloud API token
required: true
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const run_status = {
}

const dbt_cloud_api = axios.create({
baseURL: 'https://cloud.getdbt.com/api/v2/',
baseURL: `${core.getInput('dbt_cloud_url')}/api/v2/`,
timeout: 5000, // 5 seconds
headers: {
'Authorization': `Token ${core.getInput('dbt_cloud_token')}`,
Expand Down

0 comments on commit 191eae7

Please sign in to comment.