Skip to content

Commit

Permalink
Set command (#51)
Browse files Browse the repository at this point in the history
* bump to dbt version 1.4.6

* update set output command

* add documentation for base Dockerfile

---------

Co-authored-by: Leo Schick <[email protected]>
  • Loading branch information
mwhitaker and leo-schick authored May 2, 2023
1 parent d242164 commit 6c07593
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 10 deletions.
12 changes: 6 additions & 6 deletions Docker_build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ FROM --platform=$build_for python:3.9.9-slim-bullseye as base
# N.B. The refs updated automagically every release via bumpversion
# N.B. dbt-postgres is currently found in the core codebase so a value of dbt-core@<some_version> is correct

ARG dbt_core_ref=dbt-core@v1.3.0
ARG dbt_postgres_ref=dbt-core@v1.3.0
ARG dbt_redshift_ref=dbt-redshift@v1.3.0
ARG dbt_bigquery_ref=dbt-bigquery@v1.3.0
ARG dbt_snowflake_ref=dbt-snowflake@v1.3.0
ARG dbt_spark_ref=dbt-spark@v1.3.0
ARG dbt_core_ref=dbt-core@v1.4.6
ARG dbt_postgres_ref=dbt-core@v1.4.6
ARG dbt_redshift_ref=dbt-redshift@v1.4.0
ARG dbt_bigquery_ref=dbt-bigquery@v1.4.3
ARG dbt_snowflake_ref=dbt-snowflake@v1.4.2
ARG dbt_spark_ref=dbt-spark@v1.4.1
# special case args
ARG dbt_spark_version=all
ARG dbt_third_party
Expand Down
7 changes: 7 additions & 0 deletions Docker_build/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# how to build the Docker image and send to Docker Hub

update the references in the Dockerfile to current ones.

`docker build --tag mwhitaker/dbt_all:v1.4.6 --target dbt-all .`

`docker push mwhitaker/dbt_all:v1.4.6`
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG DBT_VERSION=v1.3.0
ARG DBT_VERSION=v1.4.6
FROM mwhitaker/dbt_all:${DBT_VERSION}

COPY entrypoint.sh /entrypoint.sh
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
A GitHub Action to run [dbt](https://www.getdbt.com) commands in a Docker container. It uses the official images provided by [Fishtown Analytics](https://hub.docker.com/r/fishtownanalytics/dbt/tags). You can use [dbt commands](https://docs.getdbt.com/reference/dbt-commands) such as `run`, `test` and `debug`. This action captures the dbt console output for use in subsequent steps.

### dbt version
The current version of dbt is **1.3.0**. Please note that from dbt v1.0.0. you may have to change your dbt project structure compared to v0.x.x. See the [migration](https://docs.getdbt.com/docs/guides/migration-guide/upgrading-to-1-0-0) docs.
The current version of dbt is **1.4.6**. Please note that from dbt v1.0.0. you may have to change your dbt project structure compared to v0.x.x. See the [migration](https://docs.getdbt.com/docs/guides/migration-guide/upgrading-to-1-0-0) docs.

dbt updates their [docker images](https://hub.docker.com/r/fishtownanalytics/dbt/tags?page=1&ordering=last_updated) on a frequent basis and the main branch of this Github Action should be close to the last stable tag. If you need to use an earlier version of dbt, you can call this action with a specific [release](https://github.com/mwhitaker/dbt-action/releases), eg `mwhitaker/[email protected]` or `mwhitaker/[email protected]`.

Expand Down
4 changes: 2 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ $1 2>&1 | tee "${DBT_ACTION_LOG_FILE}"
if [ $? -eq 0 ]
then
echo "DBT_RUN_STATE=passed" >> $GITHUB_ENV
echo "::set-output name=result::passed"
echo "result=passed" >> $GITHUB_OUTPUT
echo "DBT run OK" >> "${DBT_ACTION_LOG_FILE}"
else
echo "DBT_RUN_STATE=failed" >> $GITHUB_ENV
echo "::set-output name=result::failed"
echo "result=failed" >> $GITHUB_OUTPUT
echo "DBT run failed" >> "${DBT_ACTION_LOG_FILE}"
exit 1
fi

0 comments on commit 6c07593

Please sign in to comment.