Skip to content

.github/workflows/automation.yml #1188

.github/workflows/automation.yml

.github/workflows/automation.yml #1188

Workflow file for this run

name: GitHub Follower Bot Running
on:
schedule:
- cron: '0 */4 * * *'
workflow_dispatch:
permissions:
contents: write
actions: read
packages: write
jobs:
up-and-running:
runs-on: ubuntu-latest
steps:
- name: Get working copy
uses: actions/checkout@main
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/officialcodevoyage/.local/bin
pipenv install
- name: Run Follower bot
run: |
export github_user=officialcodevoyage
export personal_github_token=${{ secrets.PERSONAL_GITHUB_TOKEN }}
pipenv run python bot.py
- name: Commit and push if it changed
run: |
git config user.name "OfficialCodeVoyage"
git config user.email "[email protected]"
git add -A
timestamp=$(date -u)
git commit -m "Last Commit: ${timestamp}(UTC)" || exit 0
git push origin main