drone-gitea-release/.drone.yml
RaviAnand Mohabir 8a5a2b85cf
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/tag Build is passing
ci: 👷 remove main branch from tag trigger
2024-06-25 15:17:25 +02:00

73 lines
1.8 KiB
YAML

kind: pipeline
type: kubernetes
name: tag, build Docker image and create release
steps:
- name: bump tag
image: python:3.12
commands:
- git config --global user.email "drone@dikurium.ch"
- git config --global user.name "Drone"
- git config --global url."https://$GIT_USERNAME:$GIT_PASSWORD@gitea.dikurium.ch/".insteadOf "https://gitea.dikurium.ch/"
- git config --global --add --bool push.autoSetupRemote true
- git fetch --tags
- pip install -U Commitizen
- cz bump --annotated-tag --yes
- git push --follow-tags
- cz changelog $(cz version -p) > CZ_CURRENT_CHANGELOG.md
environment:
GIT_USERNAME:
from_secret: git_username
GIT_PASSWORD:
from_secret: git_password
failure: ignore
- name: publish Docker image
image: plugins/docker
settings:
registry: gitea.dikurium.ch
repo: gitea.dikurium.ch/innopeak/drone-gitea-release
auto_tag: true
username:
from_secret: docker_username
password:
from_secret: docker_password
- image: gitea.dikurium.ch/innopeak/drone-gitea-release
name: create release
settings:
gitea_password:
from_secret: git_password
gitea_url: gitea.dikurium.ch
gitea_username:
from_secret: git_username
notes_file: CZ_CURRENT_CHANGELOG.md
owner: innopeak
repo: drone-gitea-release
depends_on:
- bump tag
trigger:
branch:
- main
event:
- push
---
kind: pipeline
type: kubernetes
name: publish Docker image
steps:
- name: publish Docker image
image: plugins/docker
settings:
registry: gitea.dikurium.ch
repo: gitea.dikurium.ch/innopeak/drone-gitea-release
auto_tag: true
username:
from_secret: docker_username
password:
from_secret: docker_password
trigger:
event:
- tag