-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (50 loc) · 2 KB
/
forward-announcements.yml
File metadata and controls
57 lines (50 loc) · 2 KB
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
47
48
49
50
51
52
53
54
55
56
57
name: Forward Announcements
on:
schedule:
- cron: "0 * * * *"
workflow_dispatch:
permissions:
contents: write
jobs:
forward:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Forward announcements
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_SOURCE_OWNER: ${{ github.repository_owner }}
GITHUB_SOURCE_REPO: community
ANNOUNCEMENTS_STATE_PATH: state/sent-announcements.json
ANNOUNCEMENTS_MINIMUM_AGE_MINUTES: "0"
MATRIX_HOMESERVER_URL: ${{ secrets.MATRIX_HOMESERVER_URL }}
MATRIX_ACCESS_TOKEN: ${{ secrets.MATRIX_ACCESS_TOKEN }}
MATRIX_ROOM_ID: ${{ secrets.MATRIX_ROOM_ID }}
MATRIX_BOT_USER_ID: ${{ secrets.MATRIX_BOT_USER_ID }}
ENABLE_GOOGLE_GROUPS: "true"
GOOGLE_GROUPS_SMTP_HOST: ${{ secrets.GOOGLE_GROUPS_SMTP_HOST }}
GOOGLE_GROUPS_SMTP_PORT: ${{ secrets.GOOGLE_GROUPS_SMTP_PORT }}
GOOGLE_GROUPS_SMTP_USERNAME: ${{ secrets.GOOGLE_GROUPS_SMTP_USERNAME }}
GOOGLE_GROUPS_SMTP_APP_PASSWORD: ${{ secrets.GOOGLE_GROUPS_SMTP_APP_PASSWORD }}
GOOGLE_GROUPS_TO_ADDRESS: ${{ secrets.GOOGLE_GROUPS_TO_ADDRESS }}
ENABLE_BLUESKY: "true"
BLUESKY_IDENTIFIER: ${{ secrets.BLUESKY_IDENTIFIER }}
BLUESKY_APP_PASSWORD: ${{ secrets.BLUESKY_APP_PASSWORD }}
run: python3 scripts/announcements.py
- name: Commit updated state
run: |
if git diff --quiet -- state/sent-announcements.json; then
exit 0
fi
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add state/sent-announcements.json
git commit -m "chore: update sent announcements state"
git push