Skip to content

Commit a2e6078

Browse files
committed
build(github): prevents azure actions from running on forks of the repository
1 parent 1dc16cf commit a2e6078

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.github/workflows/azure-static-web-apps-delightful-beach-055ecb503.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ env:
1717

1818
jobs:
1919
build_and_deploy_job:
20-
if: github.actor != 'dependabot[bot]' && (github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed'))
20+
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed' && github.repository == github.event.pull_request.head.repo.full_name)
2121
runs-on: ubuntu-latest
2222
name: Build and Deploy Job
2323
steps:
@@ -50,7 +50,7 @@ jobs:
5050
###### End of Repository/Build Configurations ######
5151

5252
close_pull_request_job:
53-
if: github.event_name == 'pull_request' && github.event.action == 'closed'
53+
if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.repository == github.event.pull_request.head.repo.full_name
5454
runs-on: ubuntu-latest
5555
name: Close Pull Request Job
5656
steps:

.github/workflows/chromatic.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ env:
3535
# List of jobs
3636
jobs:
3737
chromatic-deployment:
38-
if: github.repository_owner == 'Umbraco'
38+
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.repository == github.event.pull_request.head.repo.full_name)
3939
# Operating System
4040
runs-on: ubuntu-latest
4141
# Job steps

0 commit comments

Comments
 (0)