We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 09f5fd8 commit db9b544Copy full SHA for db9b544
.github/workflows/files-changed.yaml
@@ -0,0 +1,26 @@
1
+name: File Change Webhook
2
+
3
+on:
4
+ push:
5
+ paths:
6
+ - 'specs/*'
7
+jobs:
8
+ notify:
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - name: Checkout code
12
+ uses: actions/checkout@v2
13
14
+ - name: Get Changed Files
15
+ id: changes
16
+ run: |
17
+ git diff-tree --no-commit-id --name-only -r ${{ github.sha }} > changed_files.txt
18
+ echo "::set-output name=files::$(cat changed_files.txt)"
19
20
+ - name: Send Webhook for Each File
21
22
+ for file in $(cat changed_files.txt); do
23
+ filename=$(basename "$file")
24
+ name_without_extension="${filename%.*}"
25
+ curl -X POST "${{ secrets.WEBHOOK_URL }}/$name_without_extension" -d "{\"filename\":\"$name_without_extension\"}" -H "Content-Type: application/json"
26
+ done
0 commit comments