Normal Checks #41029
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: Normal Checks | |
on: | |
# push: | |
# branches: | |
# - main | |
schedule: | |
# * is a special character in YAML so you have to quote this string | |
- cron: '15 * * * *' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install PyGithub | |
pip install pyyaml | |
- name: Run script and commit changes | |
run: | | |
python _generators/normal_checks.py | |
echo "Setting up git credentials..." | |
git remote set-url origin https://x-access-token:"$GITHUB_TOKEN"@github.com/"$GITHUB_REPOSITORY".git | |
git config --global user.email "[email protected]" | |
git config --global user.name "actions" | |
echo "Git credentials configured." | |
git checkout main | |
git add . | |
git commit -m "Automatic update of data" && git push --set-upstream origin main || true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |