Skip to content

Monitor Exchange Inbox #69

Monitor Exchange Inbox

Monitor Exchange Inbox #69

Workflow file for this run

name: Monitor Exchange Inbox
on:
schedule:
# Runs every hour (at the top of the hour)
- cron: "0 * * * *"
workflow_dispatch: # Allows manual triggering of the workflow
inputs:
interval:
description: "Polling interval in seconds"
required: false
default: "3600"
jobs:
monitor-inbox:
runs-on: ubuntu-latest
steps:
# Checkout the repository
- name: Checkout Repository
uses: actions/checkout@v4
# Set up Python
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install exchangelib PyGitHub
- name: Set Git user name and email
run: |
git config --global user.name "Labot"
git config --global user.email "[email protected]"
git config --global url.https://github.com/.insteadOf git://github.com/
# Run the Python script
- name: Run Monitor Script
env:
EMAIL: ${{ secrets.EXCHANGE_EMAIL }}
PASSWORD: ${{ secrets.EXCHANGE_PASSWORD }}
GITHUB_TOKEN: ${{ secrets.MY_PAT_TOKEN }}
run: |
python labot/monitor_email.py