Open matt-winkler opened 1 year ago
Is your dbt_project.yml
located in somewhere other than the dbt project directory?
I test the actions with the workflow below. The working-directory
input definitely works in my case.
https://github.com/yu-iskw/action-sqlfluff/blob/main/.github/workflows/test.yml#L36
Thanks for the response @yu-iskw . Yes, the dbt_project.yml
is located in a directory called dbt_transform
within the repo rather than at the root. Are you saying that the action template linked above works in this case, and can you please provide the name of the directory where the dbt_project.yml
file lives?
hey @yu-iskw , do you have a chance to test the same scenario with the dbt
templater, instead of jinja
?
INPUT_WORKING_DIRECTORY
:
https://github.com/yu-iskw/action-sqlfluff/blob/2b313f10cc5db392bed833c57b7bac89775b2597/action.yml#L155
my hypothesis is, as we're CWD to INPUT_WORKING_DIRECTORY
below, to install dbt deps;
https://github.com/yu-iskw/action-sqlfluff/blob/2b313f10cc5db392bed833c57b7bac89775b2597/entrypoint.sh#L55-L57
For the same reason, we may need to CWD to INPUT_WORKING_DIRECTORY
before calling sqlfluff
as well.
could it be the reason?🤔
Is it possible to use this action template on dbt when the
dbt_project.yml
file lives somewhere other than the root of the repository? If so, how to configure it? The below describes what I have attempted.In a git action template, I am setting the
working-directory
foryu-iskw/action-sqlfluff@v3
as follows:In the SQL Fluff configuration file, I've also experimented with setting the
project_dir
to'/home/runner/work/<repo-name>/<repo-name>/dbt_transform_code'
In either case, I see the following error from the git action run:
Which appears to be telling me the process is looking for the
dbt_project.yml
file to exist at the root of the repository.