Skip to content

Run Python script on schedule #174

Run Python script on schedule

Run Python script on schedule #174

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Run Python script on schedule
env:
GITHUB_USER_NAME: Dengyu-Wu
on:
schedule:
- cron: '00 07 * * *' # Runs at 00:00 UTC every day
workflow_dispatch: # Allows manual triggering of the workflow
jobs:
build:
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.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install arxiv Requests
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Run main script
run: |
python daily_arxiv.py
- 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 and push changes
uses: github-actions-x/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
commit-message: 'Update list'
files: README.md neuromorphic-arxiv-daily.json
rebase: 'true'
name: ${{ env.GITHUB_USER_NAME }}
email: ${{ env.GITHUB_USER_EMAIL }}