Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions .github/workflows/import_meetup_events.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Import Meetup Events

on:
workflow_dispatch:
schedule:
- cron: '0 6 * * *' # every day at 6am GMT

jobs:
import-meetup:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v5

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Download iCal file
run: |
mkdir -p tools/files
curl -L "https://www.meetup.com/women-coding-community/events/ical/" -o tools/files/meetup.ics

- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('tools/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r tools/requirements.txt

- name: Run Meetup import script
run: |
cd tools
python meetup_import.py

- name: Merge imported events into events.yml
run: |
if [ -s _data/imported_events.yml ]; then
cat _data/imported_events.yml >> _data/events.yml
: > _data/imported_events.yml
echo "New events have been added to events.yml and imported_events.yml has been reset."
else
echo "No new events to import."
fi

- name: Create or Update Pull Request
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.MEETUP_IMPORT_ACTIONS_TOKEN }}
commit-message: "Automated import of Meetup events"
Comment thread
dricazenck marked this conversation as resolved.
branch: "automation/import-meetup-events"
team-reviewers: "Women-Coding-Community/leaders"
title: "Automated import of Meetup events"
body: |
This PR was created automatically by a GitHub Action to import upcoming Meetup events.
Only `_data/events.yml` should be updated.

Please review the changes `_data/events.yml` and ensure that everything is parsed correctly before merging.
labels: |
automation