File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 11name : Validate Plugin TOML
22
33on :
4- pull_request :
4+ pull_request_target :
55 branches :
66 - master
77 paths :
1010permissions :
1111 contents : read
1212 issues : write
13- pull-requests : write
1413
1514jobs :
1615 validate :
@@ -22,11 +21,12 @@ jobs:
2221 with :
2322 submodules : recursive
2423 fetch-depth : 0
24+ ref : ${{ github.event.pull_request.head.sha }}
2525
2626 - name : Get changed plugins
2727 id : changed
2828 run : |
29- CHANGED_PLUGINS=$(git diff --name-only origin/${{ github.base_ref }}...HEAD | grep '^plugins/' | cut -d'/' -f2 | sort -u | tr '\n' ' ')
29+ CHANGED_PLUGINS=$(git diff --name-only origin/${{ github.base_ref }}...${{ github.event.pull_request.head.sha }} | grep '^plugins/' | cut -d'/' -f2 | sort -u | tr '\n' ' ')
3030 echo "plugins=$CHANGED_PLUGINS" >> $GITHUB_OUTPUT
3131 echo "Changed plugins: $CHANGED_PLUGINS"
3232
5555 run : |
5656 pnpm validate ${{ steps.changed.outputs.plugins }}
5757 echo "result=success" >> $GITHUB_OUTPUT
58- # If validation fails (exit 1), continue-on-error keeps the workflow running
59- # but 'result=success' won't be written to GITHUB_OUTPUT
6058
6159 - name : Post validation comment
6260 if : always() && steps.changed.outputs.plugins != ''
You can’t perform that action at this time.
0 commit comments