forked from xy3/Available-3-Letter-Github-Usernames
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (33 loc) · 1.11 KB
/
main.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
name: Check 3-Letter Usernames Daily
on:
schedule:
- cron: "0 0 * * *" # Runs every day at 00:00 UTC.
workflow_dispatch:
jobs:
update-readme:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
persist-credentials: true # Needed for pushing changes.
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x" # Use your desired Python version.
- name: Install dependencies
run: |
pip install requests tqdm
- name: Run username checker script
run: python action.py
- name: Commit updated README if there are changes
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
if [ -n "$(git status --porcelain)" ]; then
git add README.md
git commit -m "Update README with available 3-letter usernames [skip ci]"
git push
else
echo "No changes to commit."
fi