Skip to content

Remove Structure-Directory.yaml file #1

Remove Structure-Directory.yaml file

Remove Structure-Directory.yaml file #1

name: Generate requirements.txt
on: [push]
jobs:
generate-requirements:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
token: ${{ secrets.CDAPROD_BOT_PAT }} # Use the PAT you stored as a secret
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pipreqs
- name: Generate requirements.txt
run: |
pipreqs --force .
- name: Commit requirements.txt
run: |
git config --global user.name 'Cdaprod-Bot'
git config --global user.email 'cdasmkt@gmail.com' # Replace with bot's email
git add requirements.txt
git commit -m "Update requirements.txt" || echo "No changes to commit"
git push origin HEAD:main --force # Ensure you're pushing to the correct branch