feat: Gitea Actions CI + env file + Gitea registry image
Some checks failed
Build & Push Docker Image / build (push) Failing after 1m50s

- .gitea/workflows/docker.yml: builds and pushes image to
  git.albert-zangerl.com/al/logwatch on every push to main
  and on version tags (v*)
- stack.env.example: template for environment variables
- stack.env: gitignored, lives on docker.lan next to the stack
- portainer-stack.yml: updated to use Gitea registry image
  and env_file reference

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
LogWatch
2026-03-22 08:52:00 +01:00
parent ab640de08f
commit df15adc572
5 changed files with 57 additions and 9 deletions

View File

@@ -0,0 +1,40 @@
name: Build & Push Docker Image
on:
push:
branches:
- main
tags:
- "v*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Log in to Gitea Container Registry
uses: docker/login-action@v3
with:
registry: git.albert-zangerl.com
username: ${{ gitea.actor }}
password: ${{ secrets.GITEA_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: git.albert-zangerl.com/al/logwatch
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

1
.gitignore vendored
View File

@@ -3,4 +3,5 @@ __pycache__/
*.pyo *.pyo
.env .env
.env.local .env.local
stack.env
*.log *.log

View File

@@ -6,9 +6,9 @@ services:
restart: unless-stopped restart: unless-stopped
environment: environment:
# ntfy source channel (your Watchtower notifications) # ntfy source channel (your Watchtower notifications)
- SOURCE_URL=http://192.168.123.77/albert - SOURCE_URL=https://ntfy.albert-zangerl.com/albert
# ntfy target channel (where important stuff goes) # ntfy target channel (where important stuff goes)
- TARGET_URL=http://192.168.123.77/wichtig - TARGET_URL=https://ntfy.albert-zangerl.com/wichtig
# optional: Bearer token if target channel needs auth # optional: Bearer token if target channel needs auth
# - TARGET_TOKEN=your-token-here # - TARGET_TOKEN=your-token-here
- LOG_LEVEL=INFO - LOG_LEVEL=INFO

View File

@@ -1,11 +1,7 @@
services: services:
logwatch: logwatch:
image: logwatch:latest image: git.albert-zangerl.com/al/logwatch:latest
container_name: logwatch container_name: logwatch
restart: unless-stopped restart: unless-stopped
environment: env_file:
- SOURCE_URL=https://ntfy.albert-zangerl.com/albert - stack.env
- TARGET_URL=https://ntfy.albert-zangerl.com/wichtig
# - TARGET_TOKEN=your-token-here
- LOG_LEVEL=INFO
- RECONNECT_DELAY=10

11
stack.env.example Normal file
View File

@@ -0,0 +1,11 @@
# ntfy source channel (Watchtower notifications)
SOURCE_URL=https://ntfy.albert-zangerl.com/albert
# ntfy target channel (important notifications only)
TARGET_URL=https://ntfy.albert-zangerl.com/wichtig
# Optional: Bearer token for protected ntfy target channel
# TARGET_TOKEN=
LOG_LEVEL=INFO
RECONNECT_DELAY=10