chore(ci): run notifications also from PRs merged from forks

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
Ettore Di Giacinto
2025-10-16 16:26:56 +02:00
parent 276c552583
commit ad44df6d83

View File

@@ -1,9 +1,13 @@
name: Notifications for new models
on:
pull_request:
pull_request_target:
types:
- closed
permissions:
contents: read
pull-requests: read
jobs:
notify-discord:
if: ${{ (github.event.pull_request.merged == true) && (contains(github.event.pull_request.labels.*.name, 'area/ai-model')) }}
@@ -12,7 +16,7 @@ jobs:
- uses: actions/checkout@v5
with:
fetch-depth: 0 # needed to checkout all branches for this Action to work
# Check the PR diff using the current branch and the base branch of the PR
ref: ${{ github.event.pull_request.head.sha }} # Checkout the PR head to get the actual changes
- uses: GrantBirki/git-diff-action@v2.8.1
id: git-diff-action
with:
@@ -85,7 +89,7 @@ jobs:
- uses: actions/checkout@v5
with:
fetch-depth: 0 # needed to checkout all branches for this Action to work
# Check the PR diff using the current branch and the base branch of the PR
ref: ${{ github.event.pull_request.head.sha }} # Checkout the PR head to get the actual changes
- uses: GrantBirki/git-diff-action@v2.8.1
id: git-diff-action
with: