From b65367b9aa9ffc1c1f6587401771d4b82b741d1c Mon Sep 17 00:00:00 2001 From: Steve McGrath Date: Tue, 7 Jan 2025 12:37:16 -0600 Subject: [PATCH] Updated Workflow to read from the head instead as checking against main on merge will always result in nothing --- .github/workflows/deploy.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 2767d09..bd326a8 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -1,9 +1,8 @@ name: Deployment Pipeline on: - pull_request: + push: branches: [main] - types: [closed] jobs: connector-list: @@ -19,7 +18,7 @@ jobs: run: | CONNECTORS=() for connector in $(ls connectors);do - if [ "$( git diff --name-only origin/main... -- connectors/${connector} )" != "" ] || [ "$( git diff --name-only origin/main... -- base )" != "" ] || [ "${{ vars.BUILD_ALL_CONNECTORS }}" == "true" ];then + if [ "$( git diff --name-only HEAD~1 -- connectors/${connector} )" != "" ] || [ "$( git diff --name-only HEAD~1 -- base )" != "" ] || [ "${{ vars.BUILD_ALL_CONNECTORS }}" == "true" ];then CONNECTORS+=("${connector}") fi done @@ -50,7 +49,6 @@ jobs: snyk monitor --all-projects --policy-path=.snyk build-and-deploy: - if: ${{ github.event.pull_request.merged }} name: connector ${{ matrix.connector }} runs-on: ubuntu-latest continue-on-error: true