mirror of
https://github.com/BreizhHardware/ntfy_alerts.git
synced 2026-01-18 16:37:28 +01:00
Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8550fb045c | ||
|
|
bf35608f71 | ||
|
|
b842d104c7 | ||
|
|
b22351e77e | ||
|
|
10d8a23897 | ||
|
|
4e54b557b0 | ||
|
|
a92caf5e37 | ||
|
|
f2a6d4f0de | ||
|
|
08bf34104a | ||
|
|
ff3e00eb4e | ||
|
|
802081937f | ||
|
|
f52f505e38 | ||
|
|
de60020b01 |
2
.github/workflows/create_dev.yml
vendored
2
.github/workflows/create_dev.yml
vendored
@@ -7,6 +7,7 @@ on:
|
||||
|
||||
jobs:
|
||||
build-binary:
|
||||
if: ${{ github.actor != 'dependabot[bot]' && !startsWith(github.ref, 'refs/heads/dependabot/') }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
@@ -53,6 +54,7 @@ jobs:
|
||||
path: release/github-ntfy
|
||||
|
||||
docker-build-push:
|
||||
if: ${{ github.actor != 'dependabot[bot]' && !startsWith(github.ref, 'refs/heads/dependabot/') }}
|
||||
needs: [build-binary]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
52
.github/workflows/dependabot-build.yml
vendored
Normal file
52
.github/workflows/dependabot-build.yml
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
name: Dependabot Build Check
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [dev]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
if: ${{ startsWith(github.ref, 'refs/heads/dependabot/') || github.actor == 'dependabot[bot]' }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Installer Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
target: x86_64-unknown-linux-musl
|
||||
override: true
|
||||
|
||||
- name: Installer cross
|
||||
run: cargo install cross
|
||||
|
||||
- name: Créer Cross.toml pour spécifier OpenSSL vendored
|
||||
run: |
|
||||
cat > Cross.toml << 'EOF'
|
||||
[build.env]
|
||||
passthrough = [
|
||||
"RUSTFLAGS",
|
||||
"OPENSSL_STATIC",
|
||||
"OPENSSL_NO_VENDOR"
|
||||
]
|
||||
EOF
|
||||
|
||||
- name: Construire avec cross et OpenSSL vendored
|
||||
env:
|
||||
OPENSSL_STATIC: 1
|
||||
RUSTFLAGS: "-C target-feature=+crt-static"
|
||||
OPENSSL_NO_VENDOR: 0
|
||||
run: |
|
||||
cross build --release --target x86_64-unknown-linux-musl --features vendored-openssl
|
||||
|
||||
- name: Afficher des informations de débogage
|
||||
run: |
|
||||
echo "Acteur: ${{ github.actor }}"
|
||||
echo "Référence de la branche: ${{ github.head_ref }}"
|
||||
echo "Event name: ${{ github.event_name }}"
|
||||
635
Cargo.lock
generated
635
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -12,12 +12,12 @@ vendored-openssl = ["openssl/vendored"]
|
||||
|
||||
[dependencies]
|
||||
tokio = { version = "1", features = ["full"] }
|
||||
reqwest = { version = "0.11", features = ["json", "blocking"] }
|
||||
rusqlite = { version = "0.29", features = ["bundled"] }
|
||||
reqwest = { version = "0.12", features = ["json", "blocking"] }
|
||||
rusqlite = { version = "0.36", features = ["bundled"] }
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
serde_json = "1"
|
||||
log = "0.4"
|
||||
env_logger = "0.10"
|
||||
env_logger = "0.11"
|
||||
dotenv = "0.15"
|
||||
chrono = "0.4"
|
||||
warp = "0.3"
|
||||
|
||||
37
README.md
37
README.md
@@ -15,7 +15,7 @@
|
||||
|
||||
### Docker (recommended)
|
||||
|
||||
Use our multi-architecture Docker image, which automatically supports amd64, arm64 and armv7:
|
||||
Use our Docker image, which automatically supports amd64, arm64 and armv7:
|
||||
|
||||
```yaml
|
||||
services:
|
||||
@@ -34,7 +34,6 @@ services:
|
||||
- GOTIFY_TOKEN= # Required if gotify is used
|
||||
- DISCORD_WEBHOOK_URL= # Required if discord is used
|
||||
- SLACK_WEBHOOK_URL= # Required if Slack is used
|
||||
- DB_PATH=/data # Database path
|
||||
volumes:
|
||||
- /path/to/data:/data
|
||||
ports:
|
||||
@@ -64,39 +63,19 @@ Run
|
||||
./target/release/github-ntfy
|
||||
```
|
||||
|
||||
## REST API
|
||||
The application exposes a REST API on port 8080 to manage watched repositories:
|
||||
|
||||
|
||||
Endpoint
|
||||
Method
|
||||
Description
|
||||
/app_repo
|
||||
POST
|
||||
Add a GitHub repository to watch
|
||||
/app_docker_repo
|
||||
POST
|
||||
Add a Docker repository to watch
|
||||
/watched_repos
|
||||
GET
|
||||
List all watched GitHub repositories
|
||||
/watched_docker_repos
|
||||
GET
|
||||
List all watched Docker repositories
|
||||
/delete_repo
|
||||
POST
|
||||
Delete a GitHub repository
|
||||
/delete_docker_repo
|
||||
POST
|
||||
Delete a Docker repository
|
||||
|
||||
## Version Notes
|
||||
- v2.0: Complete rewrite in Rust for better performance and reduced resource consumption
|
||||
- v1.5: Stable Python version
|
||||
- [v1.7.1](https://github.com/BreizhHardware/ntfy_alerts/tree/v1.7.2): Stable Python version
|
||||
|
||||
## Configuration
|
||||
The GitHub token (GHNTFY_TOKEN) needs to have the following permissions: repo, read:org and read:user.
|
||||
|
||||
## TODO
|
||||
- [ ] Add support for multi achitecture Docker images
|
||||
- [ ] Rework web interface
|
||||
- [ ] Add support for more notification services (Telegram, Matrix, etc.)
|
||||
- [ ] Add web oneboarding instead of using environment variables
|
||||
|
||||
## Author
|
||||
👤 BreizhHardware
|
||||
|
||||
|
||||
Reference in New Issue
Block a user