Skip to content

Commit 5d7f51a

Browse files
committed
Test Github Actions
1 parent 3fe678e commit 5d7f51a

2 files changed

Lines changed: 37 additions & 0 deletions

File tree

.github/workflows/update-reqs.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Update requirements.txt
2+
3+
on:
4+
push:
5+
paths:
6+
- '**/*.py'
7+
workflow_dispatch:
8+
9+
jobs:
10+
generate-requirements:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v3
16+
17+
- name: Set up Python
18+
uses: actions/setup-python@v4
19+
with:
20+
python-version: '3.10'
21+
22+
- name: Install pipreqs
23+
run: pip install pipreqs
24+
25+
- name: Generate requirements.txt
26+
run: pipreqs . --force
27+
28+
- name: Commit changes
29+
run: |
30+
git config --global user.name 'github-actions'
31+
git config --global user.email 'github-actions@github.com'
32+
git add requirements.txt
33+
git commit -m "chore: auto-update requirements.txt" || echo "No changes to commit"
34+
git push

pipreqs-config.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[settings]
2+
ignore = ["tests", "docs"]
3+
encoding = "utf-8"

0 commit comments

Comments
 (0)