Effortlessly Track PyPi Package Updates and Receive Email Notifications automatically by using GitHub actions.
PyPi Mail Bash allows you to monitor the versions of specified PyPi packages and receive an email notification if an update is available.
Create your own repository by clicking here.
Open versions.json
and specify the packages you want to track along with their current versions:
{
"versions": {
"great_expectations": "0.18.14",
"pandas": "2.2.1"
}
}
In this example, the script will track:
great_expectations
at version0.18.14
pandas
at version2.2.1
Navigate to your cloned repository's settings:
- Go to Code and Automation > Actions > General.
- Enable Read and write permissions for Workflows to allow updates to
versions.json
.
In your repository settings, go to Security > Secrets and Variables > Actions and add the following secrets:
Name | Description |
---|---|
EMAIL_USER |
The email address used to send notifications |
EMAIL_PASSWORD |
The password for the sending email address |
SMTP_SERVER |
The SMTP server for sending emails (e.g., smtp.gmail.com for Gmail) |
RECIPIENT_EMAIL |
The email address that will receive update notifications |
GH_TOKEN |
A fine-grained GitHub PAT. Limit it to your cloned repo with read permissions. |
You can perform a dry run of the workflow:
- Navigate to the Actions tab in your repository.
- Click on Check Package Versions on the left-hand side.
- Click on Run workflow.
Note: The workflow will only send an email if package updates are detected. To test it, consider temporarily downgrading a version in
versions.json
to ensure an update is found.
The workflow is scheduled to run automatically every midnight.
Feel free to contribute or report issues. Happy coding! 🚀