mirror of
https://github.com/appleboy/telegram-action.git
synced 2026-10-10 21:20:44 +09:00
@@ -0,0 +1,40 @@
|
|||||||
|
name: telegram message
|
||||||
|
on: [push]
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
build:
|
||||||
|
name: Build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: send custom message
|
||||||
|
uses: appleboy/telegram-action@master
|
||||||
|
env:
|
||||||
|
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
|
||||||
|
TELEGRAM_TO: ${{ secrets.TELEGRAM_TO }}
|
||||||
|
with:
|
||||||
|
args: The ${{ github.event_name }} event triggered first step.
|
||||||
|
|
||||||
|
- name: send message useing with
|
||||||
|
uses: appleboy/telegram-action@master
|
||||||
|
env:
|
||||||
|
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
|
||||||
|
TELEGRAM_TO: ${{ secrets.TELEGRAM_TO }}
|
||||||
|
with:
|
||||||
|
message: The ${{ github.event_name }} event triggered second step.
|
||||||
|
|
||||||
|
- name: send default message
|
||||||
|
uses: appleboy/telegram-action@master
|
||||||
|
env:
|
||||||
|
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
|
||||||
|
TELEGRAM_TO: ${{ secrets.TELEGRAM_TO }}
|
||||||
|
|
||||||
|
- name: send photo message
|
||||||
|
uses: appleboy/telegram-action@master
|
||||||
|
with:
|
||||||
|
message: send photo message
|
||||||
|
photo: tests/github.png
|
||||||
|
document: tests/gophercolor.png
|
||||||
|
env:
|
||||||
|
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
|
||||||
|
TELEGRAM_TO: ${{ secrets.TELEGRAM_TO }}
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
workflow "Send Notification" {
|
|
||||||
on = "push"
|
|
||||||
resolves = [
|
|
||||||
"Send Custom Message",
|
|
||||||
"Send Default Message",
|
|
||||||
"Send Photo Message",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
action "Send Custom Message" {
|
|
||||||
uses = "appleboy/telegram-action@master"
|
|
||||||
secrets = [
|
|
||||||
"TELEGRAM_TOKEN",
|
|
||||||
"TELEGRAM_TO",
|
|
||||||
]
|
|
||||||
args = "A new commit has been pushed. commit: {{ commit.sha }}"
|
|
||||||
}
|
|
||||||
|
|
||||||
action "Send Default Message" {
|
|
||||||
uses = "appleboy/telegram-action@master"
|
|
||||||
secrets = [
|
|
||||||
"TELEGRAM_TOKEN",
|
|
||||||
"TELEGRAM_TO",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
action "Send Photo Message" {
|
|
||||||
uses = "appleboy/telegram-action@master"
|
|
||||||
env = {
|
|
||||||
PHOTO = "tests/github.png"
|
|
||||||
DOCUMENT = "tests/gophercolor.png"
|
|
||||||
}
|
|
||||||
secrets = [
|
|
||||||
"TELEGRAM_TOKEN",
|
|
||||||
"TELEGRAM_TO",
|
|
||||||
]
|
|
||||||
args = "send photo message."
|
|
||||||
}
|
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
FROM appleboy/drone-telegram:1.4.2-linux-amd64
|
FROM appleboy/drone-telegram
|
||||||
|
|
||||||
ADD entrypoint.sh /entrypoint.sh
|
ADD entrypoint.sh /entrypoint.sh
|
||||||
RUN chmod +x /entrypoint.sh
|
RUN chmod +x /entrypoint.sh
|
||||||
|
|||||||
Reference in New Issue
Block a user