ci: lock workflows to be triggered by the repo owner alone

This commit is contained in:
Karim shoair
2026-07-26 23:19:51 +03:00
parent 0a7fec8f86
commit 1166ce3368
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ env:
jobs:
build-and-push:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'workflow_dispatch' || github.event.pull_request.merged == true }}
if: ${{ github.event_name == 'workflow_dispatch' || (github.event.pull_request.merged == true && github.event.pull_request.user.login == github.repository_owner) }}
permissions:
contents: read
packages: write
+1 -1
View File
@@ -9,7 +9,7 @@ on:
jobs:
create-release-and-publish:
if: github.event.pull_request.merged == true
if: github.event.pull_request.merged == true && github.event.pull_request.user.login == github.repository_owner
runs-on: ubuntu-latest
environment:
name: PyPI