Skip to content

Commit 7839d52

Browse files
authored
Update webhook.yml
1 parent a4a9edc commit 7839d52

File tree

1 file changed

+10
-17
lines changed

1 file changed

+10
-17
lines changed

.github/workflows/webhook.yml

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,24 @@
1-
name: GitHub Release to Telegram
1+
name: Notify Telegram on Release
22

33
on:
44
release:
55
types: [published]
66

77
jobs:
8-
send-to-telegram:
8+
notify-telegram:
99
runs-on: ubuntu-latest
10-
1110
steps:
12-
- name: Checkout code
11+
- name: Checkout Repository
1312
uses: actions/checkout@v3
1413

15-
- name: Set up PHP 8.2
16-
uses: shivammathur/setup-php@v2
17-
with:
18-
php-version: '8.2'
14+
- name: Install PHP (default on Ubuntu)
1915

20-
- name: Install dependencies
21-
run: |
22-
composer install
23-
24-
- name: Send release info to Telegram
16+
- name: Send release notification to Telegram
2517
env:
2618
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
2719
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
28-
GITHUB_REPO_OWNER: ${{ secrets.REPO_OWNER }}
29-
GITHUB_REPO_NAME: ${{ secrets.REPO_NAME }}
30-
run: |
31-
php webhook.php
20+
RELEASE_NAME: ${{ github.event.release.name }}
21+
RELEASE_TAG: ${{ github.event.release.tag_name }}
22+
RELEASE_BODY: ${{ github.event.release.body }}
23+
GITHUB_REPOSITORY: ${{ github.repository }}
24+
run: php webhook.php

0 commit comments

Comments
 (0)