Compare commits

...

6 Commits
v1.5 ... v1.5.2

Author SHA1 Message Date
fc577ea17f Fix error 2024-11-21 17:20:57 +01:00
ae95654ec3 Fix error 2024-11-21 17:19:52 +01:00
Félix MARQUET
7c0e34c08c Merge pull request #4 from BreizhHardware/dev
Fix DOCKERFILE error
2024-10-25 08:39:33 +02:00
Félix MARQUET
921f40e98e Fix DOCKERFILE error 2024-10-25 06:39:03 +00:00
Félix MARQUET
dcf9edba97 Merge pull request #3 from BreizhHardware/dev
New Readme.md
2024-10-24 15:54:55 +02:00
Félix MARQUET
5f2e86d86a New Readme.md 2024-10-24 13:54:27 +00:00
5 changed files with 34 additions and 51 deletions

View File

@@ -45,7 +45,7 @@ jobs:
run: |
latest_tag=${{ env.latest_tag }}
if [ -z "$latest_tag" ]; then
new_version="v1.5"
new_version="v1.5.2"
else
IFS='.' read -r -a version_parts <<< "${latest_tag#v}"
new_version="v${version_parts[0]}.$((version_parts[1] + 1)).0"

View File

@@ -1,4 +1,6 @@
**New features**:
- Add gotify compatibility please Read the README.md
- Add arm64 support
- Add armv7 support
**Full Changelog**: https://github.com/BreizhHardware/ntfy_alerts/compare/v1.4.3...v1.5

View File

@@ -7,6 +7,8 @@ ADD ntfy.py /
ADD ntfy_api.py /
ADD requirements.txt /
ADD entrypoint.sh /
ADD send_ntfy.py /
ADD send_gotify.py /
ADD index.html /var/www/html/index.html
ADD script.js /var/www/html/script.js
RUN apk add --no-cache sqlite-dev sqlite-libs gcc musl-dev nginx

View File

@@ -1,24 +1,18 @@
# ntfy_alerts
Personal ntfy alerts system
<h1 align="center">Welcome to ntfy_alerts 👋</h1>
<p>
<img alt="Version" src="https://img.shields.io/badge/version-1.5-blue.svg?cacheSeconds=2592000" />
<a href="#" target="_blank">
<img alt="License: GPL--3" src="https://img.shields.io/badge/License-GPL--3-yellow.svg" />
</a>
<a href="https://twitter.com/BreizhHardware" target="_blank">
<img alt="Twitter: BreizhHardware" src="https://img.shields.io/twitter/follow/BreizhHardware.svg?style=social" />
</a>
</p>
Feel free to contribute and to fork !
> This project allow you to have notification about new github or docker hub release on ntfy, gotify and (soon) discord.
# Python ntfy.py
## Description:
This script is used to watch the github repos and send a notification to the ntfy server when a new release is published.
## Usage
It can aloso watch Docker Hub repos and do the same as github.
## Utilisation:
auth and ntfy_url are required to be set as environment variables.
auth: can be generataed by the folowing command: echo -n 'username:password' | base64
ntfy_url: the url of the ntfy server including the topic
````python
python ntfy.py
````
## Docker:
If you want to use the docker image you can use the following docker-compose file for x86_64:
````yaml
services:
@@ -85,9 +79,21 @@ services:
- 80:80
restart: unless-stopped
````
GHNTFY_TOKEN, need to have repo, read:org and read:user
GHNTFY_TOKEN is a github token, it need to have repo, read:org and read:user
## Author
👤 **BreizhHardware**
* Website: https://mrqt.fr?ref=github
* Twitter: [@BreizhHardware](https://twitter.com/BreizhHardware)
* Github: [@BreizhHardware](https://github.com/BreizhHardware)
* LinkedIn: [@félix-marquet-5071bb167](https://linkedin.com/in/félix-marquet-5071bb167)
## Contribution
If you want to contribut, feel free to open a pull request (CONTRIBUTION.md comming soon)!
Docker Hub repo: https://hub.docker.com/r/breizhhardware/github-ntfy
## TODO:
- [x] Dockerize the ntfy.py
- [x] Add the watched repos list as a parameter
@@ -98,34 +104,7 @@ Docker Hub repo: https://hub.docker.com/r/breizhhardware/github-ntfy
- [x] Compatibility with Gotify
- [ ] Compatibility with Discord Webhook
- [x] Compatibility and distribution for arm64 and armv7
# Bash setup-notify.sh
## Description:
This script is used to setup the ntfy notification system on ssh login for a new server.
## Utilisation:
````bash
bash setup-notify.sh <ntfy_url> <username> <password> <topic>
````
ntfy_url: the url of the ntfy server
username: the username of the user
password: the password of the user
topic: the topic of the notification
This script will create a send-notify.sh in the root of your disk and add the login-notify.sh to the /etc/profile.d/ folder.
# Bash send-notify.sh
## Description:
This script is used to send a notification to the ntfy server.
## Utilisation:
````bash
bash send-notify.sh <ntfy_url> <basic_auth> <topic> <message>
````
ntfy_url: the url of the ntfy server
basic_auth: the basic auth of the user
topic: the topic of the notification
message: the message of the notification
## Show your support
Give a ⭐️ if this project helped you!

View File

@@ -57,7 +57,7 @@ def github_send_to_gotify(releases, token, url):
logger.error(f"Failed to send message to Gotify. Status code: {response.status_code}")
def docker_send_to_ntfy(releases, token, url):
def docker_send_to_gotify(releases, token, url):
url = url + "/message"
url = url + "?token=" + token
for release in releases: