name: Up requirement on: push: branches: [master] workflow_dispatch: jobs: build: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4.1.1 - name: Set up python 3.11 uses: actions/setup-python@v4 with: python-version: '3.11' - name: Install pipreqs run: | pip install pipreqs - name: Export requirements.txt run: | pipreqs . --encoding=utf8 --force - name: Upload requirements.txt uses: EndBug/add-and-commit@v9.1.3 with: author_name: github-actions[bot] author_email: github-actions[bot]@users.noreply.github.com message: ':wrench: 自动更新requirements' add: | 'requirements.txt'