Skip to content

Commit ad44df6

Browse files
committed
chore(ci): run notifications also from PRs merged from forks
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
1 parent 276c552 commit ad44df6

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

.github/workflows/notify-models.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
name: Notifications for new models
22
on:
3-
pull_request:
3+
pull_request_target:
44
types:
55
- closed
66

7+
permissions:
8+
contents: read
9+
pull-requests: read
10+
711
jobs:
812
notify-discord:
913
if: ${{ (github.event.pull_request.merged == true) && (contains(github.event.pull_request.labels.*.name, 'area/ai-model')) }}
@@ -12,7 +16,7 @@ jobs:
1216
- uses: actions/checkout@v5
1317
with:
1418
fetch-depth: 0 # needed to checkout all branches for this Action to work
15-
# Check the PR diff using the current branch and the base branch of the PR
19+
ref: ${{ github.event.pull_request.head.sha }} # Checkout the PR head to get the actual changes
1620
- uses: GrantBirki/git-diff-action@v2.8.1
1721
id: git-diff-action
1822
with:
@@ -85,7 +89,7 @@ jobs:
8589
- uses: actions/checkout@v5
8690
with:
8791
fetch-depth: 0 # needed to checkout all branches for this Action to work
88-
# Check the PR diff using the current branch and the base branch of the PR
92+
ref: ${{ github.event.pull_request.head.sha }} # Checkout the PR head to get the actual changes
8993
- uses: GrantBirki/git-diff-action@v2.8.1
9094
id: git-diff-action
9195
with:

0 commit comments

Comments
 (0)