Add workflow to send a Slack notification when UPGRADING.md changes (#20884)

This commit is contained in:
Bernd Ahlers
2024-11-05 18:25:40 +01:00
committed by GitHub
parent a0dfdbcd0f
commit 450560640c

View File

@@ -0,0 +1,27 @@
# This workflow sends a Slack notification to the configured channels
# when the UPGRADING.md file is updated. This is used by the docs team.
name: "Notify UPGRADING.md update"
run-name: "Notify UPGRADING.md update (${{ github.ref_name}}/${{ github.sha }})"
on:
push:
branches:
- "master"
- "[0-9].[0-9]" # Stable branches
paths:
- "UPGRADING.md"
jobs:
notify:
runs-on: "ubuntu-latest"
steps:
- name: "Send Slack message"
uses: "slackapi/slack-github-action@v1"
env:
SLACK_BOT_TOKEN: "${{ secrets.SLACK_BOT_TOKEN }}"
with:
channel-id: "${{ vars.SLACK_UPGRADE_NOTIFY_CHANNELS }}"
slack-message: >
The Graylog [${{ github.ref_name }}/UPGRADING.md](https://github.com/Graylog2/graylog2-server/blob/${{ github.sha }}/UPGRADING.md) was updated in commit [${{ github.sha }}](https://github.com/Graylog2/graylog2-server/commit/${{ github.sha }}).