mirror of
https://github.com/nodemailer/wildduck.git
synced 2024-12-27 02:10:52 +08:00
Post commit messages to Slack with Github Actions
This commit is contained in:
parent
ac9bfbdce6
commit
b2ffc11257
1 changed files with 28 additions and 0 deletions
28
.github/workflows/slack.yml
vendored
Normal file
28
.github/workflows/slack.yml
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
# This is a basic workflow that is manually triggered
|
||||
name: Slack
|
||||
|
||||
# Controls when the action will run. Workflow runs when manually triggered using the UI or API.
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
|
||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||
jobs:
|
||||
send_webhook:
|
||||
# The type of runner that the job will run on
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||
steps:
|
||||
# Runs a single command using the runners shell
|
||||
- name: Webhook
|
||||
env:
|
||||
webhook_url: ${{ secrets.ZONE_WEBHOOK_URL }}
|
||||
curl_options: '--fail -s'
|
||||
data: '{"channel":"wildduck-changelog", "text": "**${{ github.actor }}** pushed <https://github.com/${{ github.repository }}/commit/${{ github.sha }}|${{ github.sha }}> to **${{ github.ref_name }}**"}'
|
||||
run: |
|
||||
curl $curl_options \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "User-Agent: GitHub-Action" \
|
||||
--data "$data" $webhook_url
|
Loading…
Reference in a new issue