-
Notifications
You must be signed in to change notification settings - Fork 9
44 lines (40 loc) · 1.16 KB
/
automation.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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