@@ -22,30 +22,18 @@ jobs:
22
22
pip install -r requirements.txt
23
23
- name : Install Recce
24
24
run : |
25
- pip install recce-nightly
26
- - name : Add packages.yml file
27
- run : |
28
- echo '${{ vars.PACKAGES_YAML }}' > packages.yml
25
+ pip install recce
29
26
- name : Prepare dbt Base environment
30
27
run : |
31
- if aws s3 cp s3://$AWS_S3_BUCKET/${{ github.event.pull_request.base.sha }}.tar.gz .; then
32
- echo "Base environment found in S3"
33
- tar -xvf ${{ github.event.pull_request.base.sha }}.tar.gz
34
- else
35
- echo "Base environment not found in S3. Running dbt to create base environment"
36
- git checkout ${{ github.event.pull_request.base.sha }}
37
- dbt deps
38
- dbt seed --target ${{ env.DBT_BASE_TARGET }} --target-path target-base
39
- dbt run --target ${{ env.DBT_BASE_TARGET }} --target-path target-base
40
- dbt docs generate --target ${{ env.DBT_BASE_TARGET }} --target-path target-base
41
- fi
28
+ gh repo set-default ${{ github.repository }}
29
+ base_branch=${{ github.base_ref }}
30
+ run_id=$(gh run list --workflow ${WORKFLOW_BASE} --branch ${base_branch} --status success --limit 1 --json databaseId --jq '.[0].databaseId')
31
+ echo "Download artifacts from run $run_id"
32
+ gh run download ${run_id} -n target -D target-base
33
+ gh run download ${run_id} -n duckdb
42
34
env :
43
- AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
44
- AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
45
- AWS_REGION : ${{ secrets.AWS_REGION }}
46
- AWS_S3_BUCKET : ${{ secrets.AWS_S3_BUCKET }}
47
- DBT_BASE_TARGET : " prod"
48
-
35
+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
36
+ WORKFLOW_BASE : " .github/workflows/dbt_base.yml"
49
37
- name : Prepare dbt Current environment
50
38
run : |
51
39
git checkout ${{ github.event.pull_request.head.sha }}
0 commit comments