8 Commits

Author SHA1 Message Date
appleboy a77dd3e42f chore: upgrade base image to version 1.4.0
- Update the base image version from 1.3.9 to 1.4.0

Signed-off-by: appleboy <appleboy.tw@gmail.com>
2024-09-06 19:12:31 +08:00
Artem Avanesov 2e9996f96e Change custom message to be more meaningful/useful (#40) 2021-10-18 08:49:25 +08:00
Bo-Yi Wu 2efd23283a chore: bump drone-telegram to 1.3.9 2021-04-03 07:29:57 +08:00
Bo-Yi Wu a5d86cddbc chore: sending a message without notification
https://github.com/appleboy/telegram-action/issues/26
2021-04-03 06:44:51 +08:00
Sahil Rajput f384cb685b Update README.md (#31) 2021-03-18 21:26:13 +08:00
NiJia Lin ed144893ba fix typo (#29) 2021-02-16 01:22:15 +08:00
Bo-Yi Wu beaf02496b Update Dockerfile 2021-02-13 11:08:56 +08:00
Bo-Yi Wu 6ecbcc43b0 chore(github): add commit message example 2020-10-03 16:40:19 +08:00
4 changed files with 34 additions and 27 deletions
+15 -5
View File
@@ -14,17 +14,18 @@ jobs:
token: ${{ secrets.TELEGRAM_TOKEN }}
args: The ${{ github.event_name }} event triggered first step.
- name: send message useing with
- name: send message using with
uses: ./
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
message: |
The ${{ github.event_name }} event triggered second step.
show the github varable ref: ${{ github.ref }}
show the github varable commit: ${{ github.sha }}
show the github varable ref: {{ commit.ref }}
show the github varable commit: {{ commit.sha }}
show the github variable ref: ${{ github.ref }}
show the github variable commit: ${{ github.sha }}
show the github variable ref: {{ commit.ref }}
show the github variable commit: {{ commit.sha }}
Commit Message: ${{ github.event.head_commit.message }}
- name: send default message
uses: ./
@@ -99,3 +100,12 @@ jobs:
disable_web_page_preview: true
message: |
disable link preview https://google.com.tw
- name: sending a message without notification
uses: ./
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
disable_notification: true
message: |
disable link preview https://google.com.tw
+2 -2
View File
@@ -1,6 +1,6 @@
FROM appleboy/drone-telegram:1.3.8-linux-amd64
FROM appleboy/drone-telegram:1.4.0
ADD entrypoint.sh /entrypoint.sh
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
WORKDIR /github/workspace
+15 -20
View File
@@ -8,6 +8,8 @@
## Usage
**NOTE**: If you are getting "Error: Chat not found", then you need to look at this stackoverflow's answer [here](https://stackoverflow.com/a/41291666).
Send custom message and see the custom variable as below.
```yml
@@ -19,13 +21,18 @@ jobs:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: send custom message with args
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
args: The ${{ github.event_name }} event triggered first step.
- name: send telegram message on push
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
message: |
${{ github.actor }} created commit:
Commit message: ${{ github.event.commits[0].message }}
Repository: ${{ github.repository }}
See changes: https://github.com/${{ github.repository }}/commit/${{github.sha}}
```
Remove `args` to send the default message.
@@ -56,6 +63,7 @@ Remove `args` to send the default message.
* message - optional. custom message
* message_file - optional. overwrite the default message template with the contents of the specified file.
* disable_web_page_preview - optional. disables link previews for links in this message. default is `false`.
* disable_notification - optional. disables notifications for this message, supports sending a message without notification. default is `false`.
## Example
@@ -85,19 +93,6 @@ send location message:
venue: '35.661777 139.704051 竹北體育館 新竹縣竹北市'
```
send custom message:
```yml
- name: send custom message
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
message: |
The ${{ github.event_name }} event triggered final step.
echo This event is a pull request that had an assignee removed.
```
send message using custom proxy (support `http`, `https`, and `socks5`) like `socks5://127.0.0.1:1080` or `http://222.124.154.19:23500`
```yml
+2
View File
@@ -34,6 +34,8 @@ inputs:
description: 'message format: markdown or html'
disable_web_page_preview:
description: 'disables link previews for links in this message'
disable_notification:
description: 'disables notifications for this message, supports sending a message without notification,'
runs:
using: 'docker'
image: 'Dockerfile'