| 1 |
name: Stale Bot |
| 2 |
|
| 3 |
on: |
| 4 |
schedule: |
| 5 |
- cron: "0 15 * * *" |
| 6 |
workflow_dispatch: |
| 7 |
|
| 8 |
jobs: |
| 9 |
close_stale_issues: |
| 10 |
name: Close Stale Issues |
| 11 |
if: github.repository == 'huggingface/accelerate' |
| 12 |
runs-on: ubuntu-latest |
| 13 |
permissions: |
| 14 |
issues: write |
| 15 |
pull-requests: write |
| 16 |
env: |
| 17 |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 18 |
steps: |
| 19 |
- uses: actions/checkout@v6 |
| 20 |
|
| 21 |
- name: Setup Python |
| 22 |
uses: actions/setup-python@v6 |
| 23 |
with: |
| 24 |
python-version: '3.10' |
| 25 |
cache: 'pip' |
| 26 |
cache-dependency-path: 'setup.py' |
| 27 |
|
| 28 |
- name: Install requirements |
| 29 |
run: | |
| 30 |
pip install PyGithub |
| 31 |
- name: Close stale issues |
| 32 |
run: | |
| 33 |
python utils/stale.py |