-
Notifications
You must be signed in to change notification settings - Fork 4
/
action.yml
64 lines (57 loc) · 2.09 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Acryl dbt Impact Analysis Action
description: Comments on PRs with the downstream impact of dbt changes.
inputs:
datahub_gms_host:
description: "DataHub GMS host."
required: true
datahub_gms_token:
description: "DataHub GMS token."
required: false
datahub_frontend_url:
description: "DataHub frontend URL."
required: true
dbt_adapter:
description: "Set to bigquery, snowflake, redshift, or postgres."
required: true
dbt_profile_name:
description: "Override for the dbt profile name. Defaults to the value in your dbt_project.yml."
dbt_project_folder:
description: "dbt project folder. Defaults to ."
default: '.'
debug_mode:
description: "Set to true to enable debug mode."
default: 'false'
max_impacted_downstreams:
description: "Maximum number of downstream generations."
required: false
default: 30
runs:
using: "composite"
steps:
# TODO: Add better error checking:
# - Validate that we have sufficient git history.
# - Somehow ensure that this is running on a PR.
# - Ensure that the adapter is one that we support.
- name: Run impact analysis
id: impact-analysis
shell: bash
run: ${{ github.action_path }}/src/impact_analysis.sh
env:
DBT_PROFILE_NAME: ${{ inputs.dbt_profile_name }}
DBT_ADAPTER: ${{ inputs.dbt_adapter }}
DBT_PROJECT_FOLDER: ${{ inputs.dbt_project_folder }}
DATAHUB_GMS_HOST: ${{ inputs.datahub_gms_host }}
DATAHUB_GMS_TOKEN: ${{ inputs.datahub_gms_token }}
DATAHUB_FRONTEND_URL: ${{ inputs.datahub_frontend_url }}
GITHUB_ACTION_PATH: ${{ github.action_path }}
GITHUB_BASE_REF: ${{ github.base_ref }}
DEBUG_MODE: ${{ inputs.debug_mode }}
MAX_IMPACTED_DOWNSTREAMS: ${{ inputs.max_impacted_downstreams }}
# Post a comment on the PR.
- uses: marocchino/[email protected]
with:
header: acryl-impact-analysis-${{ inputs.dbt_project_folder }}
message: ${{ steps.impact-analysis.outputs.IMPACT_ANALYSIS_MD }}
branding:
icon: 'activity'
color: 'green'