From b08ff5c921a9e13d92e822120b43de342c7b6bed Mon Sep 17 00:00:00 2001 From: "Jeremy R. Manning" Date: Thu, 18 Jul 2024 11:00:04 -0400 Subject: [PATCH] Update launch_events.yml --- .github/workflows/launch_events.yml | 59 ++++++++++++++++++++--------- 1 file changed, 41 insertions(+), 18 deletions(-) diff --git a/.github/workflows/launch_events.yml b/.github/workflows/launch_events.yml index 1a4eea3..a96a266 100644 --- a/.github/workflows/launch_events.yml +++ b/.github/workflows/launch_events.yml @@ -1,24 +1,47 @@ name: Launch Events -on: workflow_dispatch + +on: + workflow_dispatch: jobs: generate_event_reminders: runs-on: ubuntu-latest + steps: - - name: Checkout repository - uses: actions/checkout@v2 - - - 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 - - - name: Generate event reminder scripts - run: python generate_event_reminders.py - env: - GMAIL_PASSWORD: ${{ secrets.GMAIL_PASSWORD }} + - 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 + + - 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 + run: | + git add .github/workflows/reminder_*.yml + git commit -m "Add event reminder workflows" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Push changes + uses: ad-m/github-push-action@v0.6 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + branch: main