Created Notification #16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Created Notification | |
| on: | |
| issues: | |
| types: [opened] | |
| discussion: | |
| types: [created] | |
| jobs: | |
| notify-on-issue-created: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - name: Create Issue Post | |
| if: github.event_name == 'issues' | |
| uses: jiacai2050/telegraph-action@v1 | |
| id: telegraph-issue | |
| with: | |
| token: ${{ secrets.TELEGRAPH_TOKEN }} | |
| telegram-token: ${{ secrets.TELEGRAM_TOKEN }} | |
| chat-id: "@zig_cc" | |
| author-name: "ZigCC Team" | |
| title: "${{ github.event.issue.title }}" | |
| author-url: "${{ github.event.issue.html_url }}" | |
| body: | | |
| ${{ github.event.issue.body }} | |
| - name: Create Discussion Post | |
| if: github.event_name == 'discussion' | |
| uses: jiacai2050/telegraph-action@v1 | |
| id: telegraph-discussion | |
| with: | |
| token: ${{ secrets.TELEGRAPH_TOKEN }} | |
| telegram-token: ${{ secrets.TELEGRAM_TOKEN }} | |
| chat-id: "@zig_cc" | |
| author-name: "ZigCC Team" | |
| title: "${{ github.event.discussion.title }}" | |
| author-url: "${{ github.event.discussion.html_url }}" | |
| body: | | |
| ${{ github.event.discussion.body }} | |
| # - name: Send Telegram Message | |
| # uses: jiacai2050/telegram-action@v1 | |
| # with: | |
| # message: "${{ steps.telegraph-issue.outputs.url || steps.telegraph-discussion.outputs.url }}" |