pradyumn tendulkar commited on
Commit
bc4eb9f
·
unverified ·
1 Parent(s): 4270e7a

Update discord_notif.yml

Browse files
.github/workflows/discord_notif.yml CHANGED
@@ -1,19 +1,20 @@
1
  name: Discord Notification
2
-
3
  on:
4
  push:
5
-
6
  jobs:
7
  notify:
8
  runs-on: ubuntu-latest
9
-
10
  steps:
 
 
 
11
  - name: Send Discord notification with commit details
12
  env:
13
  DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
14
  run: |
15
  COMMIT_MESSAGE=$(git log -1 --pretty=%B)
16
- COMMIT_URL="https://github.com/pradyten/Resume-Comparator/commit/${GITHUB_SHA}"
17
  curl -X POST -H "Content-Type: application/json" \
18
  -d "{\"content\": \"A new commit was pushed to the main branch by $GITHUB_ACTOR.\nCommit: $GITHUB_SHA\nMessage: $COMMIT_MESSAGE\nURL: $COMMIT_URL\"}" \
19
  $DISCORD_WEBHOOK_URL
 
 
1
  name: Discord Notification
 
2
  on:
3
  push:
 
4
  jobs:
5
  notify:
6
  runs-on: ubuntu-latest
 
7
  steps:
8
+ - name: Checkout repository
9
+ uses: actions/checkout@v4
10
+
11
  - name: Send Discord notification with commit details
12
  env:
13
  DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
14
  run: |
15
  COMMIT_MESSAGE=$(git log -1 --pretty=%B)
16
+ COMMIT_URL="https://github.com/${GITHUB_REPOSITORY}/commit/${GITHUB_SHA}"
17
  curl -X POST -H "Content-Type: application/json" \
18
  -d "{\"content\": \"A new commit was pushed to the main branch by $GITHUB_ACTOR.\nCommit: $GITHUB_SHA\nMessage: $COMMIT_MESSAGE\nURL: $COMMIT_URL\"}" \
19
  $DISCORD_WEBHOOK_URL
20
+ shell: bash