Track Python package from requirements.txt, check if newer version exist in PyPI and provide update info. Can be useful to notify or to trigger an up to date docker image build.
You can use built version on release-master branch
Optionnal Specify if commit and push need to be done. Default to true
Optionnal Path to requirements.txt
file. Default to /requirements.txt
Optionnal Make a backup of requirements.txt if set to true
. Default to false
If true, need to commit the new requirements.txt file
on:
push:
branches:
- 'main'
- 'master'
schedule:
- cron: '0 6 * * *'
jobs:
check_dep:
runs-on: ubuntu-latest
name: Check python requirements file and update
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Check requirements.txt
uses: Verbalinsurection/track-pypi-version@1.1.0
id: checkr
with:
compush: 'true'
backup: 'false'
reqfile: './requirements.txt'
- name: Get if update needed output
run: echo ${{ steps.checkr.outputs.commit }}