File tree 2 files changed +36
-38
lines changed
2 files changed +36
-38
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ name : File Change Webhook
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - " master"
7
+ paths :
8
+ - " specs/*"
9
+
10
+ jobs :
11
+ notify :
12
+ runs-on : ubuntu-latest
13
+ steps :
14
+ - name : Checkout code
15
+ uses : actions/checkout@v4
16
+
17
+ - name : Get Changed Files
18
+ id : changes
19
+ shell : bash
20
+ run : |
21
+ #files_changed=$(git diff-tree --no-commit-id --name-only -r ${{ github.sha }} | cut -c 7- | cut -c -5)
22
+ echo "Files changed: $files_changed"
23
+ echo "CHANGED_FILES=$files_changed" >> "$GITHUB_OUTPUT"
24
+
25
+ - name : Send Webhook
26
+ shell : bash
27
+ env :
28
+ CHANGED_FILES : ${{ steps.changes.outputs.CHANGED_FILES }}
29
+ WEBHOOK : ${{ secrets.WEBHOOK_URL }}
30
+ run : |
31
+ echo "Processing webhooks for..."
32
+ echo $CHANGED_FILES
33
+ for file in $CHANGED_FILES; do
34
+ echo "Processing file: $file"
35
+ curl -i -H "Accept: application/json" -H "Content-Type:application/json" -X POST "$WEBHOOK/$file"
36
+ done
You can’t perform that action at this time.
0 commit comments