Skip to content

Commit 1232fcb

Browse files
committed
feat: CI
1 parent 2428ce4 commit 1232fcb

File tree

4 files changed

+34
-3
lines changed

4 files changed

+34
-3
lines changed

.github/workflows/ci.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: CI
2+
on:
3+
push:
4+
branches: [main, dev]
5+
pull_request:
6+
branches: [main, dev]
7+
8+
jobs:
9+
deploy:
10+
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev'
11+
runs-on: self-hosted
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Install docker
16+
uses: docker/setup-buildx-action@v3
17+
18+
- name: Login to registry
19+
uses: docker/login-action@v3
20+
with:
21+
registry: ${{ secrets.REGISTRY_URL }}
22+
username: ${{ secrets.REGISTRY_USERNAME }}
23+
password: ${{ secrets.REGISTRY_TOKEN }}
24+
25+
- name: Build and push
26+
uses: docker/build-push-action@v6
27+
with:
28+
push: true
29+
tags: |
30+
${{ secrets.REGISTRY_URL }}/ung/zammad-workflows:${{ github.ref == 'refs/heads/main' && 'prod' || 'dev' }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# BDE Tickets to PDF
1+
# Zammad Workflows
22

33
Webhook Flask pour générer automatiquement des PDFs à partir des tickets Zammad du BDE.
44

server.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1+
import threading
12
from flask import Flask, request, jsonify
23
from config import Config
34
from auth import requires_auth
45
from services.pdf import PDFGenerator
56
from services.zammad import ZammadService
67
from services.email import EmailService
7-
import threading
8+
89

910
try:
1011
Config.validate()

wsgi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from server import app as application
1+
from server import app as application # pylint: disable=unused-import
22

33
# Optional: you can place WSGI middleware or other initialisation here.
44
# Example for gunicorn:

0 commit comments

Comments
 (0)