Update The Planet #35059
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 The Planet | |
on: | |
pull_request: | |
schedule: | |
# * is a special character in YAML so you have to quote this string | |
- cron: '*/60 * * * *' | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# https://github.com/actions/checkout | |
- uses: actions/checkout@v4.1.0 | |
with: | |
ref: master | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
- name: Set up git repository | |
run: | | |
git status | |
git branch | |
# https://github.com/actions/checkout#push-a-commit-using-the-built-in-token | |
git config user.name "macbrebot" | |
git config user.email "<51094006+macbrebot@users.noreply.github.com>" | |
- name: Install dependencies | |
run: pip install -r requirements.txt | |
- name: Update The Planet | |
run: make | |
- name: Commit changes | |
run: | | |
git diff | |
git add docs | |
( git commit -m 'Updating the Planet via GitHub Actions' && git push origin master ) || echo 'Nothing to commit' |