Skip to content

Commit

Permalink
fix pr workflow for pr_target
Browse files Browse the repository at this point in the history
  • Loading branch information
raghunathd8 authored and peanball committed Nov 8, 2023
1 parent ab2a2d6 commit 5a1b554
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/test-sample-apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ name: TEST
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
pull_request_target:
branches: [ main ]
types: [ opened, synchronize, reopened ]

jobs:
Expand All @@ -15,7 +14,9 @@ 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.pull_request.head.repo.fork == 'true'
run: |
echo "Deployment not possible!"
exit 1
Expand Down Expand Up @@ -73,4 +74,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 5a1b554

Please sign in to comment.