This example shows you how to use GitHub Actions to run dbt against BigQuery.
-
Follow the instructions on getdbt.com for installing and initializing a dbt project.
-
Copy this action (dbt.yml) into the workflows directory.
mkdir .github mkdir .github/workflows cp ~/Downloads/dbt.yml .github/workflows/
-
Follow the instructions on getdbt.com for creating a BigQuery service account, download the json key file, and copy it into a GitHub Secret named
DBT_GOOGLE_BIGQUERY_KEYFILE
. -
In the GitHub Action
dbt.yml
file, replace the Google Project and BigQuery dataset environment variables with your project's variables. -
Push to GitHub and watch it run.
brilliant, thanks for this. I was echoing the secret directly to a file before and DBT couldn't parse it correctly.