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 468b531
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 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 @@ -14,8 +12,12 @@ jobs:
concurrency: test-landscape
environment: cf_env
steps:
- name: Debug
run: |
echo "github.event.head.repo.full_name: ${{ github.event.head.repo.full_name }}"
echo "github.event.base.repo.full_name: ${{ github.event.base.repo.full_name }}"
- 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]') && (github.event.head.repo.full_name != github.event.base.repo.full_name))
run: |
echo "Deployment not possible!"
exit 1
Expand Down Expand Up @@ -73,4 +75,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 468b531

Please sign in to comment.