Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/pgoslatara/dbt-cloud-download-artifacts-action
- Owner: pgoslatara
- License: mit
- Created: 2024-09-12T21:09:16.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-12-23T11:24:53.000Z (about 2 months ago)
- Last Synced: 2024-12-23T12:29:45.820Z (about 2 months ago)
- Language: Python
- Homepage:
- Size: 212 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
- awesome-dbt - dbt-cloud-download-artifacts-action - A GitHub action for downloading dbt artifacts from dbt Cloud CI jobs. (CI/CD)
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 pipelineon:
pull_request:
branches:
- mainjobs:
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
```