Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/pgoslatara/dbt-cloud-download-artifacts-action

GitHub Action to download JSON artifacts from a dbt Cloud CI job triggered by a pull request.
https://github.com/pgoslatara/dbt-cloud-download-artifacts-action

Last synced: 1 day ago
JSON representation

GitHub Action to download JSON artifacts from a dbt Cloud CI job triggered by a pull request.

Awesome Lists containing this project

README

        


























# dbt-cloud-download-artifacts-action

GitHub Action to download JSON artifacts from a dbt Cloud CI job triggered by a pull request.

# How to use

```yaml
name: CI pipeline

on:
pull_request:
branches:
- main

jobs:
download-dbt-artifacts:
permissions:
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Download dbt artifacts
uses: pgoslatara/dbt-cloud-download-artifacts-action@v1
with:
commit-sha: ${{ github.event.pull_request.head.sha }}
dbt-cloud-api-token: ${{ secrets.DBT_CLOUD_API_TOKEN }}
dbt-cloud-api-url-base: cloud.getdbt.com # Optional: Defaults to "cloud.getdbt.com".
output-dir: target # Optional: Defaults to "target".
step: 4 # Optional: Defaults to last step in CI job.
verbose: true # Optional: Defaults to false.

- name: Do something with the artifacts
...
```

# Contributing

Set up a local development environment, requires [uv](https://github.com/astral-sh/uv):
```bash
make install
```

Create API tokens for both dbt Cloud and GitHub. Copy `.env.example` to `.env` and update the values.

All tests can be run with
```bash
make test
```