Launch Events #53
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Launch Events | |
on: | |
workflow_dispatch: | |
permissions: | |
contents: write | |
actions: write | |
jobs: | |
generate_event_reminders: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
with: | |
persist-credentials: false | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
python -m pip install pandas | |
python -m pip install pyyaml | |
python -m pip install markdown | |
- name: Install GitHub CLI | |
run: sudo apt-get install gh -y | |
- name: Authenticate with GitHub CLI | |
run: echo "${{ secrets.PERSONAL_ACCESS_TOKEN }}" | gh auth login --with-token | |
- name: Generate event reminder scripts | |
run: python generate_event_reminders.py | |
env: | |
GMAIL_PASSWORD: ${{ secrets.GMAIL_PASSWORD }} | |
- name: Configure git | |
run: | | |
git config --global user.name 'github-actions[bot]' | |
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
- name: Commit new workflows and scripts | |
run: | | |
git add .github/workflows/reminder_*.yml scripts/send_email_*.py | |
git commit -m "Add event reminder workflows and scripts" | |
- name: Push changes | |
run: | | |
git remote set-url origin https://x-access-token:${{ secrets.PERSONAL_ACCESS_TOKEN }}@github.com/${{ github.repository }} | |
git push origin HEAD:main |