.github/workflows/calculate_schedule.yaml #1
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: Update Schedule | |
on: | |
schedule: | |
# run tuesday at noon each week | |
- cron: '0 12 * * 2' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
environment: scheduling | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.10' | |
- name: Install Poetry | |
run: | | |
curl -sSL https://install.python-poetry.org | python - | |
poetry --version | |
poetry config virtualenvs.create false | |
- name: Install Dependencies | |
run: poetry install | |
- name: Pull Repository | |
run: | | |
git config --global user.name "GitHub Actions" | |
git config --global user.email "slobentanzer@users.noreply.github.com" | |
git pull origin main | |
- name: Run Script | |
env: | |
BIOCYPHER_GITHUB_PROJECT_TOKEN: ${{ secrets.BIOCYPHER_GITHUB_PROJECT_TOKEN }} | |
run: poetry run python calculate_schedule.py | |
- name: Commit Changes and Push | |
run: | | |
git add README.md | |
git commit -m "Update README.md" | |
git push origin main |