Skip to content

Commit

Permalink
Updated Workflow to read from the head instead as checking against ma…
Browse files Browse the repository at this point in the history
…in on merge will always result in nothing
  • Loading branch information
SteveMcGrath committed Jan 7, 2025
1 parent ecb03ca commit e6d8d39
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
name: Deployment Pipeline

on:
pull_request:
push:
branches: [main]
types: [closed]

jobs:
connector-list:
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e6d8d39

Please sign in to comment.