mirror of
https://github.com/appleboy/telegram-action.git
synced 2026-05-14 10:52:51 +00:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 11eac4982b | |||
| e8ea5ee34f | |||
| 2eee0c6ce3 | |||
| bd236a6c5a | |||
| a155de7800 | |||
| 4025d6255a |
+13
-2
@@ -1,9 +1,12 @@
|
||||
workflow "Send Notification" {
|
||||
on = "push"
|
||||
resolves = ["Post message to Telegram"]
|
||||
resolves = [
|
||||
"Send Custom Message",
|
||||
"Send Default Message"
|
||||
]
|
||||
}
|
||||
|
||||
action "Post message to Telegram" {
|
||||
action "Send Custom Message" {
|
||||
uses = "appleboy/telegram-action@master"
|
||||
secrets = [
|
||||
"TELEGRAM_TOKEN",
|
||||
@@ -11,3 +14,11 @@ action "Post message to Telegram" {
|
||||
]
|
||||
args = "A new commit has been pushed."
|
||||
}
|
||||
|
||||
action "Send Default Message" {
|
||||
uses = "appleboy/telegram-action@master"
|
||||
secrets = [
|
||||
"TELEGRAM_TOKEN",
|
||||
"TELEGRAM_TO",
|
||||
]
|
||||
}
|
||||
|
||||
+5
-11
@@ -1,21 +1,15 @@
|
||||
FROM golang:1.11
|
||||
FROM appleboy/drone-telegram:1.4.1-linux-amd64
|
||||
|
||||
# Github labels
|
||||
LABEL "com.github.actions.name"="Telegram Notify"
|
||||
LABEL "com.github.actions.description"="Sending a Telegram notification message"
|
||||
LABEL "com.github.actions.description"="Sending a Telegram message"
|
||||
LABEL "com.github.actions.icon"="message-square"
|
||||
LABEL "com.github.actions.color"="blue"
|
||||
|
||||
LABEL "repository"="https://github.com/Ilshidur/actions"
|
||||
LABEL "homepage"="https://github.com/appleboy/telegram-action"
|
||||
LABEL "repository"="https://github.com/appleboy/telegram-action"
|
||||
LABEL "homepage"="https://github.com/appleboy"
|
||||
LABEL "maintainer"="Bo-Yi Wu <appleboy.tw@gmail.com>"
|
||||
LABEL "version"="0.0.1"
|
||||
|
||||
ENV TELEGRAM_VERSION=1.4.0
|
||||
ENV OS_ARCH=linux-amd64
|
||||
|
||||
RUN wget https://github.com/appleboy/drone-telegram/releases/download/${TELEGRAM_VERSION}/drone-telegram-${TELEGRAM_VERSION}-${OS_ARCH} -O /bin/drone-telegram
|
||||
RUN chmod +x /bin/drone-telegram
|
||||
LABEL "version"="0.0.2"
|
||||
|
||||
ADD entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
@@ -6,8 +6,10 @@
|
||||
|
||||
## Usage
|
||||
|
||||
Send custom message as blow
|
||||
|
||||
```
|
||||
action "Post message to Telegram" {
|
||||
action "Send Custom Message" {
|
||||
uses = "appleboy/telegram-action@master"
|
||||
secrets = [
|
||||
"TELEGRAM_TOKEN",
|
||||
@@ -17,6 +19,20 @@ action "Post message to Telegram" {
|
||||
}
|
||||
```
|
||||
|
||||
Send the default message. Please remove args
|
||||
|
||||
```
|
||||
action "Send Default Message" {
|
||||
uses = "appleboy/telegram-action@master"
|
||||
secrets = [
|
||||
"TELEGRAM_TOKEN",
|
||||
"TELEGRAM_TO",
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
<img src="images/telegram-workflow.png">
|
||||
|
||||
## Secrets
|
||||
|
||||
Getting started with [Telegram Bot API](https://core.telegram.org/bots/api).
|
||||
|
||||
+3
-1
@@ -2,6 +2,8 @@
|
||||
|
||||
set -eu
|
||||
|
||||
export TELEGRAM_MESSAGE="$*"
|
||||
export GITHUB="true"
|
||||
|
||||
[ -n "$*" ] && export TELEGRAM_MESSAGE="$*"
|
||||
|
||||
/bin/drone-telegram
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 56 KiB |
Reference in New Issue
Block a user