GitHub Follower Bot Running #117095
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: GitHub Follower Bot Running | |
on: | |
schedule: | |
- cron: '*/10 * * * *' | |
workflow_dispatch: | |
jobs: | |
up-and-running: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get working copy | |
uses: actions/checkout@master | |
with: | |
fetch-depth: 1 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.8' | |
- name: Install pipenv | |
run: pip install pipenv --user | |
- name: Setup Python virtual environment | |
run: | | |
PATH=$PATH:/home/peter/.local/bin | |
pipenv install | |
- name: Run Follower bot | |
run: | | |
export github_user=peter279k | |
export personal_github_token=${{ secrets.PERSONAL_GITHUB_TOKEN }} | |
pipenv run python follower_bot.py | |
- name: Commit and push if it changed | |
run: | | |
git config user.name "peter279k" | |
git config user.email "[email protected]" | |
git add -A | |
timestamp=$(date -u) | |
git commit -m "Last Commit: ${timestamp}(UTC)" || exit 0 | |
git push origin master |