Files
Maxime Killinger eef8c3835e
All checks were successful
🚀 Docker Build and Push / build-and-push (push) Successful in 48s
🎉 Initial commit: CrowdSec notification service
2025-12-31 18:16:07 +01:00

36 lines
1.1 KiB
YAML

name: 🚀 Docker Build and Push
on: [push]
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout code
uses: https://github.com/actions/checkout@v4
- name: 🛠️ Set up Docker Buildx
uses: https://github.com/docker/setup-buildx-action@v3
- name: 🔐 Login to Gitea Registry
uses: https://github.com/docker/login-action@v3
with:
registry: gitea.killinger.fr
username: maxime.killinger
password: ${{ secrets.DOCKER_TOKEN }}
- name: 📦 Build and push Docker image
uses: https://github.com/docker/build-push-action@v5
with:
context: .
push: true
tags: |
gitea.killinger.fr/maxime.killinger/crowdsec-notify:${{ github.ref_name == 'main' && 'latest' || github.ref_name }}
- name: 🔔 Trigger Watchtower
if: github.ref == 'refs/heads/main'
env:
TOKEN: ${{ secrets.WATCHTOWER_TOKEN }}
run: |
curl -X GET -H "Authorization: Bearer $TOKEN" http://192.168.1.118:3026/v1/update