add drone.yml for cicd
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
greg 2025-06-28 14:45:40 +02:00
parent 58b1e28ba3
commit ecc02b065c

55
.drone.yml Normal file
View File

@ -0,0 +1,55 @@
kind: pipeline
name: hugo
type: docker
platform:
os: linux
arch: arm64
trigger:
branch:
- main
steps:
- name: build docker image and push to registry
image: plugins/docker
volumes:
- name: dockersock
path: "/var/run/docker.sock"
settings:
debug: true
username:
from_secret: REGISTRY_USER
password:
from_secret: REGISTRY_PASSWORD
registry: "dockerregistry.gregandev.fr"
insecure: true
privileged: true
repo: "dockerregistry.gregandev.fr/recettes"
dockerfile: ./Dockerfile
- name: notify
image: greglebreton/drone-email:arm64
settings:
from.address: contact@gregandev.fr
host: mail.gregandev.fr
port: 587
debug: true
username: contact@gregandev.fr
password:
from_secret: MAIL_PASSWORD
recipients: [ greg@gregandev.fr ]
subject: >
[{{ build.status }}]
{{ repo.owner }}/{{ repo.name }}
body: >
📝 {{repo.name}} / {{commit.branch}} - {{commit.message}} <br />
{{#success build.status}}
✅ succeeded for 👷‍♂️ build {{build.number}}
{{else}}
🛑 failed for 👷‍♂️ build {{build.number}}
{{/success}}
<br /><img src='https://git.gregandev.fr/assets/img/logo.svg'/>
when:
status: [ success, failure ]