mirror of
https://github.com/appleboy/telegram-action.git
synced 2026-07-10 04:07:57 +00:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2efd23283a | |||
| a5d86cddbc | |||
| f384cb685b | |||
| ed144893ba | |||
| beaf02496b | |||
| 6ecbcc43b0 |
@@ -14,17 +14,18 @@ jobs:
|
|||||||
token: ${{ secrets.TELEGRAM_TOKEN }}
|
token: ${{ secrets.TELEGRAM_TOKEN }}
|
||||||
args: The ${{ github.event_name }} event triggered first step.
|
args: The ${{ github.event_name }} event triggered first step.
|
||||||
|
|
||||||
- name: send message useing with
|
- name: send message using with
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
to: ${{ secrets.TELEGRAM_TO }}
|
to: ${{ secrets.TELEGRAM_TO }}
|
||||||
token: ${{ secrets.TELEGRAM_TOKEN }}
|
token: ${{ secrets.TELEGRAM_TOKEN }}
|
||||||
message: |
|
message: |
|
||||||
The ${{ github.event_name }} event triggered second step.
|
The ${{ github.event_name }} event triggered second step.
|
||||||
show the github varable ref: ${{ github.ref }}
|
show the github variable ref: ${{ github.ref }}
|
||||||
show the github varable commit: ${{ github.sha }}
|
show the github variable commit: ${{ github.sha }}
|
||||||
show the github varable ref: {{ commit.ref }}
|
show the github variable ref: {{ commit.ref }}
|
||||||
show the github varable commit: {{ commit.sha }}
|
show the github variable commit: {{ commit.sha }}
|
||||||
|
Commit Message: ${{ github.event.head_commit.message }}
|
||||||
|
|
||||||
- name: send default message
|
- name: send default message
|
||||||
uses: ./
|
uses: ./
|
||||||
@@ -99,3 +100,12 @@ jobs:
|
|||||||
disable_web_page_preview: true
|
disable_web_page_preview: true
|
||||||
message: |
|
message: |
|
||||||
disable link preview https://google.com.tw
|
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
@@ -1,6 +1,6 @@
|
|||||||
FROM appleboy/drone-telegram:1.3.8-linux-amd64
|
FROM appleboy/drone-telegram:1.3.9-linux-amd64
|
||||||
|
|
||||||
ADD entrypoint.sh /entrypoint.sh
|
COPY entrypoint.sh /entrypoint.sh
|
||||||
RUN chmod +x /entrypoint.sh
|
RUN chmod +x /entrypoint.sh
|
||||||
|
|
||||||
WORKDIR /github/workspace
|
WORKDIR /github/workspace
|
||||||
|
|||||||
@@ -8,6 +8,8 @@
|
|||||||
|
|
||||||
## Usage
|
## 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.
|
Send custom message and see the custom variable as below.
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
@@ -56,6 +58,7 @@ Remove `args` to send the default message.
|
|||||||
* message - optional. custom message
|
* message - optional. custom message
|
||||||
* message_file - optional. overwrite the default message template with the contents of the specified file.
|
* 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_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
|
## Example
|
||||||
|
|
||||||
|
|||||||
@@ -34,6 +34,8 @@ inputs:
|
|||||||
description: 'message format: markdown or html'
|
description: 'message format: markdown or html'
|
||||||
disable_web_page_preview:
|
disable_web_page_preview:
|
||||||
description: 'disables link previews for links in this message'
|
description: 'disables link previews for links in this message'
|
||||||
|
disable_notification:
|
||||||
|
description: 'disables notifications for this message, supports sending a message without notification,'
|
||||||
runs:
|
runs:
|
||||||
using: 'docker'
|
using: 'docker'
|
||||||
image: 'Dockerfile'
|
image: 'Dockerfile'
|
||||||
|
|||||||
Reference in New Issue
Block a user