forked from debezium/debezium
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (39 loc) · 1.43 KB
/
doc-changes-workflow.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# This workflow is designed to notify a given email address with pertinent information
# about changes to the Documentation files, using a cron-based trigger.
name: Documentation Changes
on:
# Schedule job to run at midnight UTC every day
schedule:
- cron: "0 0 * * *"
jobs:
script:
if: github.repository == 'debezium/debezium'
runs-on: ubuntu-latest
steps:
- name: Checkout action
uses: actions/checkout@v4
with:
# This is necessary as this script needs to examine all history and prepare an output
# report that defines all changes made to the Documentation within the last number of
# days.
fetch-depth: 0
# Always run this against main
ref: 'main'
- name: Run script
id: changes
run: |
./github-support/notify-documentation-changes.sh "main"
CHANGES=$(cat documentation_changes.txt)
echo "CHANGES<<EOF" >> $GITHUB_ENV
echo "$CHANGES" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Send email notification
uses: zulip/github-actions-zulip/send-message@v1
with:
api-key: ${{ secrets.ZULIP_TOKEN }}
email: ${{ secrets.ZULIP_TOKEN_EMAIL_ADDRESS }}
organization-url: "https://debezium.zulipchat.com"
to: "documentation"
type: "stream"
topic: "activity"
content: ${{ env.CHANGES }}