6 Commits

Author SHA1 Message Date
Bo-Yi Wu dc870f34e9 chore: upgrade to 1.3.8 docker image 2020-10-03 16:33:44 +08:00
Bo-Yi Wu 6cdf58fd81 chore: use current action in testing 2020-10-03 16:23:46 +08:00
Bo-Yi Wu 1ecd8d50e4 refactor: disable_web_page_preview 2020-10-03 16:10:54 +08:00
Bo-Yi Wu 9e5e0be372 chore: support disable web page preview (#24) 2020-10-03 08:42:51 +08:00
Bo-Yi Wu 0e7bbc5ef7 Merge pull request #17 from crazyuploader/patch-1
Update README.md
2020-07-19 01:17:37 +08:00
Jugal Kishore 3295af7b78 Update README.md
Fix typo
2020-07-18 17:27:06 +05:30
4 changed files with 35 additions and 14 deletions
+30 -12
View File
@@ -8,14 +8,14 @@ jobs:
steps:
- uses: actions/checkout@master
- name: send custom message with args
uses: appleboy/telegram-action@master
uses: ./
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
args: The ${{ github.event_name }} event triggered first step.
- name: send message useing with
uses: appleboy/telegram-action@master
uses: ./
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
@@ -27,13 +27,13 @@ jobs:
show the github varable commit: {{ commit.sha }}
- name: send default message
uses: appleboy/telegram-action@master
uses: ./
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
- name: send photo message
uses: appleboy/telegram-action@master
uses: ./
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
@@ -42,7 +42,7 @@ jobs:
document: './tests/gophercolor.png'
- name: send location message
uses: appleboy/telegram-action@master
uses: ./
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
@@ -50,7 +50,7 @@ jobs:
venue: '35.661777 139.704051 竹北體育館 新竹縣竹北市'
- name: send custom message
uses: appleboy/telegram-action@master
uses: ./
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
@@ -59,7 +59,7 @@ jobs:
echo This event is a pull request that had an assignee removed.
- name: send message file
uses: appleboy/telegram-action@master
uses: ./
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
@@ -72,12 +72,30 @@ jobs:
# token: ${{ secrets.TELEGRAM_TOKEN }}
# socks5: "http://222.124.154.19:23500"
# message: Send message from socks5 proxy URL.
- name: try multiple message
uses: appleboy/telegram-action@master
# - name: try multiple message
# uses: appleboy/telegram-action@master
# with:
# to: ${{ secrets.TELEGRAM_TO }}
# token: ${{ secrets.TELEGRAM_TOKEN }}
# format: html
# message: |
# ⚡️ <a href="https://github.com/aszenz/repo/commit/${{ github.event.push.after }}">Commits</a> pushed to master by <em>${{ github.event.push.pusher.name }}</em> ⚡️
# ${{ github.actor }}:${{ github.event.head_commit.message }}
- name: link preview
uses: ./
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
format: html
message: |
⚡️ <a href="https://github.com/aszenz/repo/commit/${{ github.event.push.after }}">Commits</a> pushed to master by <em>${{ github.event.push.pusher.name }}</em> ⚡️
${{ github.actor }}:${{ github.event.head_commit.message }}
show link preview https://google.com.tw
- name: disable link preview
uses: ./
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
disable_web_page_preview: true
message: |
disable link preview https://google.com.tw
+1 -1
View File
@@ -1,4 +1,4 @@
FROM appleboy/drone-telegram:1.3.6-linux-amd64
FROM appleboy/drone-telegram:1.3.8-linux-amd64
ADD entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
+2 -1
View File
@@ -8,7 +8,7 @@
## Usage
Send custom message and see the custom variable as blow.
Send custom message and see the custom variable as below.
```yml
name: telegram message
@@ -55,6 +55,7 @@ Remove `args` to send the default message.
* format - optional. `markdown` or `html`. See [MarkdownV2 style](https://core.telegram.org/bots/api#markdownv2-style)
* 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`.
## Example
+2
View File
@@ -32,6 +32,8 @@ inputs:
description: 'enable debug mode.'
format:
description: 'message format: markdown or html'
disable_web_page_preview:
description: 'disables link previews for links in this message'
runs:
using: 'docker'
image: 'Dockerfile'