Skip to content

Commit

Permalink
skip pull-request event for dependabot[bot] user
Browse files Browse the repository at this point in the history
  • Loading branch information
raghunathd8 committed Nov 6, 2023
1 parent a3f1472 commit dec2e09
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/test-sample-apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ name: TEST
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
pull_request_target:
types: [ opened, synchronize, reopened ]

Expand All @@ -15,7 +13,7 @@ jobs:
environment: cf_env
steps:
- name: Limit access
if: (github.event_name == 'pull_request' && github.actor == 'dependabot[bot]') || (github.event_name == 'pull_request_target' && github.actor != 'dependabot[bot]')
if: ((github.event_name == 'pull_request_target') && (github.event.head.repo.full_name != github.event.base.repo.full_name)) || (github.event_name == 'pull_request_target' && github.actor != 'dependabot[bot]')
run: |
echo "Deployment not possible!"
exit 1
Expand Down Expand Up @@ -73,4 +71,4 @@ jobs:
yq e '.applications.[].name' "${GITHUB_WORKSPACE}/http2/apps-manifest.yml" | while read -r app_name; do
echo "Deleting app: $app_name"
cf8 delete "$app_name" -r -f
done
done

0 comments on commit dec2e09

Please sign in to comment.