mirror of
https://github.com/appleboy/telegram-action.git
synced 2026-07-05 01:37:56 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 221e6b6849 | |||
| 9177cafddc | |||
| 65a1d3c2f9 |
+92
-93
@@ -1,111 +1,110 @@
|
|||||||
name: telegram message
|
name: telegram message
|
||||||
on: [push]
|
on: [push]
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
build:
|
build:
|
||||||
name: Build
|
name: Build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@master
|
- uses: actions/checkout@master
|
||||||
- name: send custom message with args
|
- name: send custom message with args
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
to: ${{ secrets.TELEGRAM_TO }}
|
to: ${{ secrets.TELEGRAM_TO }}
|
||||||
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 using 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 variable ref: ${{ github.ref }}
|
show the github variable ref: ${{ github.ref }}
|
||||||
show the github variable commit: ${{ github.sha }}
|
show the github variable commit: ${{ github.sha }}
|
||||||
show the github variable ref: {{ commit.ref }}
|
show the github variable ref: {{ commit.ref }}
|
||||||
show the github variable commit: {{ commit.sha }}
|
show the github variable commit: {{ commit.sha }}
|
||||||
Commit Message: ${{ github.event.head_commit.message }}
|
Commit Message: ${{ github.event.head_commit.message }}
|
||||||
|
|
||||||
- name: send default message
|
- name: send default message
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
to: ${{ secrets.TELEGRAM_TO }}
|
to: ${{ secrets.TELEGRAM_TO }}
|
||||||
token: ${{ secrets.TELEGRAM_TOKEN }}
|
token: ${{ secrets.TELEGRAM_TOKEN }}
|
||||||
|
|
||||||
- name: send photo message
|
- name: send photo message
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
to: ${{ secrets.TELEGRAM_TO }}
|
to: ${{ secrets.TELEGRAM_TO }}
|
||||||
token: ${{ secrets.TELEGRAM_TOKEN }}
|
token: ${{ secrets.TELEGRAM_TOKEN }}
|
||||||
message: send photo message
|
message: send photo message
|
||||||
photo: './tests/github.png'
|
photo: "./tests/github.png"
|
||||||
document: './tests/gophercolor.png'
|
document: "./tests/gophercolor.png"
|
||||||
|
|
||||||
- name: send location message
|
- name: send location message
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
to: ${{ secrets.TELEGRAM_TO }}
|
to: ${{ secrets.TELEGRAM_TO }}
|
||||||
token: ${{ secrets.TELEGRAM_TOKEN }}
|
token: ${{ secrets.TELEGRAM_TOKEN }}
|
||||||
location: '24.9163213 121.1424972'
|
location: "24.9163213 121.1424972"
|
||||||
venue: '35.661777 139.704051 竹北體育館 新竹縣竹北市'
|
venue: "35.661777 139.704051 竹北體育館 新竹縣竹北市"
|
||||||
|
|
||||||
- name: send custom message
|
- name: send custom message
|
||||||
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 final step.
|
The ${{ github.event_name }} event triggered final step.
|
||||||
echo This event is a pull request that had an assignee removed.
|
echo This event is a pull request that had an assignee removed.
|
||||||
|
|
||||||
- name: send message file
|
- name: send message file
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
to: ${{ secrets.TELEGRAM_TO }}
|
to: ${{ secrets.TELEGRAM_TO }}
|
||||||
token: ${{ secrets.TELEGRAM_TOKEN }}
|
token: ${{ secrets.TELEGRAM_TOKEN }}
|
||||||
message_file: tests/message.txt
|
message_file: tests/message.txt
|
||||||
|
|
||||||
# - name: send message using socks5 proxy URL
|
# - name: send message using socks5 proxy URL
|
||||||
# uses: appleboy/telegram-action@master
|
# uses: appleboy/telegram-action@master
|
||||||
# with:
|
# with:
|
||||||
# to: ${{ secrets.TELEGRAM_TO }}
|
# to: ${{ secrets.TELEGRAM_TO }}
|
||||||
# token: ${{ secrets.TELEGRAM_TOKEN }}
|
# token: ${{ secrets.TELEGRAM_TOKEN }}
|
||||||
# socks5: "http://222.124.154.19:23500"
|
# socks5: "http://222.124.154.19:23500"
|
||||||
# message: Send message from socks5 proxy URL.
|
# message: Send message from socks5 proxy URL.
|
||||||
|
|
||||||
# - name: try multiple message
|
# - name: try multiple message
|
||||||
# uses: appleboy/telegram-action@master
|
# uses: appleboy/telegram-action@master
|
||||||
# with:
|
# with:
|
||||||
# to: ${{ secrets.TELEGRAM_TO }}
|
# to: ${{ secrets.TELEGRAM_TO }}
|
||||||
# token: ${{ secrets.TELEGRAM_TOKEN }}
|
# token: ${{ secrets.TELEGRAM_TOKEN }}
|
||||||
# format: html
|
# format: html
|
||||||
# message: |
|
# 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> ⚡️
|
# ⚡️ <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 }}
|
# ${{ github.actor }}:${{ github.event.head_commit.message }}
|
||||||
|
|
||||||
- name: link preview
|
- name: link preview
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
to: ${{ secrets.TELEGRAM_TO }}
|
to: ${{ secrets.TELEGRAM_TO }}
|
||||||
token: ${{ secrets.TELEGRAM_TOKEN }}
|
token: ${{ secrets.TELEGRAM_TOKEN }}
|
||||||
message: |
|
message: |
|
||||||
show link preview https://google.com.tw
|
show link preview https://google.com.tw
|
||||||
|
|
||||||
- name: disable link preview
|
- name: disable link preview
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
to: ${{ secrets.TELEGRAM_TO }}
|
to: ${{ secrets.TELEGRAM_TO }}
|
||||||
token: ${{ secrets.TELEGRAM_TOKEN }}
|
token: ${{ secrets.TELEGRAM_TOKEN }}
|
||||||
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
|
- name: sending a message without notification
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
to: ${{ secrets.TELEGRAM_TO }}
|
to: ${{ secrets.TELEGRAM_TO }}
|
||||||
token: ${{ secrets.TELEGRAM_TOKEN }}
|
token: ${{ secrets.TELEGRAM_TOKEN }}
|
||||||
disable_notification: true
|
disable_notification: true
|
||||||
message: |
|
message: |
|
||||||
disable link preview https://google.com.tw
|
disable link preview https://google.com.tw
|
||||||
|
|||||||
@@ -0,0 +1,33 @@
|
|||||||
|
name: Goreleaser
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- "*"
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
goreleaser:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Setup go
|
||||||
|
uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: "^1"
|
||||||
|
|
||||||
|
- name: Run GoReleaser
|
||||||
|
uses: goreleaser/goreleaser-action@v6
|
||||||
|
with:
|
||||||
|
# either 'goreleaser' (default) or 'goreleaser-pro'
|
||||||
|
distribution: goreleaser
|
||||||
|
version: latest
|
||||||
|
args: release --clean
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
builds:
|
||||||
|
- # If true, skip the build.
|
||||||
|
# Useful for library projects.
|
||||||
|
# Default is false
|
||||||
|
skip: true
|
||||||
|
|
||||||
|
changelog:
|
||||||
|
use: github
|
||||||
|
groups:
|
||||||
|
- title: Features
|
||||||
|
regexp: "^.*feat[(\\w)]*:+.*$"
|
||||||
|
order: 0
|
||||||
|
- title: "Bug fixes"
|
||||||
|
regexp: "^.*fix[(\\w)]*:+.*$"
|
||||||
|
order: 1
|
||||||
|
- title: "Enhancements"
|
||||||
|
regexp: "^.*chore[(\\w)]*:+.*$"
|
||||||
|
order: 2
|
||||||
|
- title: "Refactor"
|
||||||
|
regexp: "^.*refactor[(\\w)]*:+.*$"
|
||||||
|
order: 3
|
||||||
|
- title: "Build process updates"
|
||||||
|
regexp: ^.*?(build|ci)(\(.+\))??!?:.+$
|
||||||
|
order: 4
|
||||||
|
- title: "Documentation updates"
|
||||||
|
regexp: ^.*?docs?(\(.+\))??!?:.+$
|
||||||
|
order: 4
|
||||||
|
- title: Others
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
FROM appleboy/drone-telegram:1.4.0
|
FROM ghcr.io/appleboy/drone-telegram:1.4.0
|
||||||
|
|
||||||
COPY entrypoint.sh /entrypoint.sh
|
COPY entrypoint.sh /entrypoint.sh
|
||||||
RUN chmod +x /entrypoint.sh
|
RUN chmod +x /entrypoint.sh
|
||||||
|
|||||||
Reference in New Issue
Block a user