-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathaction.yml
29 lines (28 loc) · 999 Bytes
/
action.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
name: 'stargazers'
description: 'Embedd latest stargazers of repository in README file'
runs:
using: composite
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.9
- uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- shell: bash
run: |
python -m pip install -r ${{ github.action_path }}/requirements.txt
- shell: bash
run: |-
README_PATH=$(readlink -f README.md)
python ${{ github.action_path }}/stargazers.py ${{ github.server_url }}/${{ github.repository }} $README_PATH
- shell: bash
run: |-
git config --global user.email "[email protected]"
git config --global user.name "stargazers-bot"
git diff --quiet || (git add README.md && git commit -m "⭐ Update stargazers ⭐")
git push -f