Skip to content

Commit

Permalink
Add GitHub Actions workflow to update requirements.txt on PR merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Fontanapink committed Dec 15, 2023
1 parent f3a6ca4 commit a49f2d9
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/update-requirements.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Update requirements.txt on PR merge

on:
pull_request:
types: [closed]
branches:
- master

jobs:
update-requirements:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Automatic requirements.txt for Python Project
uses: ryan-rozario/pipreqs-action@master
with:
PROJECT_PATH: project_folder # Replace with the path to your Python project
REQUIREMENT_PATH: project_folder/requirements.txt # Replace with your requirements.txt file path
8 changes: 6 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
*.pyc
.idea*
build/
.ipynb_checkpoints*
data/
.vscode/
.vscode/
.ipynb_checkpoints*
.ipynb_checkpoints/
.pytest_cache/
venv/
.venv/

0 comments on commit a49f2d9

Please sign in to comment.