From ee6f548104837e5059cad495ee23ccdd8e068655 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Sat, 2 Nov 2019 14:50:12 +0800 Subject: [PATCH] chore: update format --- .github/workflows/ci.yml | 31 +++++++++++++------------------ action.yml | 10 ++++++++-- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1f4d433..40272fb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,51 +9,46 @@ jobs: - uses: actions/checkout@master - name: send custom message with args uses: appleboy/telegram-action@master - env: - TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }} - TELEGRAM_TO: ${{ secrets.TELEGRAM_TO }} 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 - env: - TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }} - TELEGRAM_TO: ${{ secrets.TELEGRAM_TO }} with: + to: ${{ secrets.TELEGRAM_TO }} + token: ${{ secrets.TELEGRAM_TOKEN }} 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 }} + with: + to: ${{ secrets.TELEGRAM_TO }} + token: ${{ secrets.TELEGRAM_TOKEN }} - name: send photo message uses: appleboy/telegram-action@master with: + to: ${{ secrets.TELEGRAM_TO }} + token: ${{ secrets.TELEGRAM_TOKEN }} message: send photo message photo: './tests/github.png' document: './tests/gophercolor.png' - env: - TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }} - TELEGRAM_TO: ${{ secrets.TELEGRAM_TO }} - name: send location message uses: appleboy/telegram-action@master with: + to: ${{ secrets.TELEGRAM_TO }} + token: ${{ secrets.TELEGRAM_TOKEN }} location: '24.9163213 121.1424972' venue: '35.661777 139.704051 竹北體育館 新竹縣竹北市' - env: - TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }} - TELEGRAM_TO: ${{ secrets.TELEGRAM_TO }} - name: send custom message uses: appleboy/telegram-action@master - env: - TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }} - TELEGRAM_TO: ${{ secrets.TELEGRAM_TO }} with: + to: ${{ secrets.TELEGRAM_TO }} + token: ${{ secrets.TELEGRAM_TOKEN }} message: | The ${{ github.event_name }} event triggered final step. echo This event is a pull request that had an assignee removed. diff --git a/action.yml b/action.yml index 974ea0a..344da7a 100644 --- a/action.yml +++ b/action.yml @@ -2,6 +2,14 @@ name: 'Telegram Message Notify' description: 'Sending a Telegram message' author: 'Bo-Yi Wu' inputs: + to: + description: 'telegram user' + token: + description: 'telegram token' + message: + description: 'telegram message' + message_file: + description: 'overwrite the default message template with the contents of the specified file' photo: description: 'send the photo message.' document: @@ -22,8 +30,6 @@ inputs: description: 'enable debug mode.' format: description: 'message format: markdown or html' - message_file: - description: 'overwrite the default message template with the contents of the specified file' runs: using: 'docker' image: 'Dockerfile'