-
Notifications
You must be signed in to change notification settings - Fork 16
44 lines (36 loc) · 1.19 KB
/
sync-events.yml
File metadata and controls
44 lines (36 loc) · 1.19 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
name: Sync Community Events
on:
schedule:
# Run daily at 6:00 AM UTC (8:00 AM Paris time in summer, 7:00 AM in winter)
- cron: '0 6 * * *'
workflow_dispatch:
jobs:
sync-events:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run events sync script
run: python .github/scripts/sync_events.py
- name: Commit changes
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add */events.json events.json
git diff --quiet && git diff --staged --quiet || git commit -m "Sync Meetup events via teemup"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}