Skip to content

Commit a27a599

Browse files
committed
Use pull_request_target
1 parent 91bd00f commit a27a599

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

.github/workflows/test-all-warehouses.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Test all warehouse platforms
22
on:
3-
pull_request:
3+
pull_request_target:
44
branches: ["master"]
55
# Allows you to run this workflow manually from the Actions tab
66
workflow_dispatch:
@@ -66,7 +66,7 @@ jobs:
6666
warehouse-type: ${{ matrix.warehouse-type }}
6767
dbt-version: ${{ matrix.dbt-version }}
6868
elementary-ref: ${{ inputs.elementary-ref }}
69-
dbt-data-reliability-ref: ${{ inputs.dbt-data-reliability-ref }}
69+
dbt-data-reliability-ref: ${{ inputs.dbt-data-reliability-ref != '' && inputs.dbt-data-reliability-ref || (github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || '') }}
7070
secrets: inherit
7171

7272
notify_failures:

.github/workflows/test-warehouse.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,8 @@ env:
5151
TESTS_DIR: ${{ github.workspace }}/dbt-data-reliability/integration_tests
5252

5353
jobs:
54-
approve:
55-
runs-on: ubuntu-latest
56-
steps:
57-
- name: Approval notice
58-
run: |
59-
echo "Your PR needs to be approved to run on the dwh_tests environment before this workflow can continue"
60-
6154
test:
6255
runs-on: ubuntu-latest
63-
needs: approve
6456
environment: dwh_tests # This is a github environment (not to be confused with env vars)
6557
concurrency:
6658
# This is what eventually defines the schema name in the data platform.
@@ -123,7 +115,6 @@ jobs:
123115
env:
124116
PROFILES_YML: ${{ secrets.CI_PROFILES_YML }}
125117
run: |
126-
echo "Setting profiles.yml"
127118
mkdir -p ~/.dbt
128119
DBT_VERSION=$(pip show dbt-core | grep -i version | awk '{print $2}' | sed 's/\.//g')
129120
UNDERSCORED_REF_NAME=$(echo "${{ inputs.warehouse-type }}_dbt_${DBT_VERSION}_${BRANCH_NAME}" | awk '{print tolower($0)}' | head -c 40 | sed "s/-/_/g")

0 commit comments

Comments
 (0)