name: Update Calendar on: push: branches: - main paths: - 'meetings.yaml' - 'generate_calendar.py' - '.gitea/workflows/update-calendar.yaml' schedule: # Run daily at 00:00 UTC - cron: '0 0 * * *' workflow_dispatch: jobs: update-calendar: runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v5 with: python-version: '3.11' - name: Install dependencies run: | pip install pyyaml - name: Generate calendar files run: | python generate_calendar.py - name: Check for changes id: check_changes run: | git diff --quiet calendar.ics README.md || echo "changed=true" >> $GITHUB_OUTPUT - name: Commit and push changes if: steps.check_changes.outputs.changed == 'true' run: | git config --local user.email "noreply@thelinuxcast.org" git config --local user.name "Calendar Bot" git add calendar.ics README.md git commit -m "Auto-update calendar files 🤖 Generated with automation" git push