drone-gitea-release/.drone.yml

72 lines
2.0 KiB
YAML
Raw Permalink Normal View History

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 || (echo "An error occured while bumping the tag." && exit 0)
- git push --follow-tags
- cz changelog $(cz version -p) --file-name CZ_CURRENT_CHANGELOG.md || echo "An error occured while generating the changelog."
environment:
GIT_USERNAME:
from_secret: git_username
GIT_PASSWORD:
from_secret: git_password
- 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:0.6
name: create release
settings:
gitea_password:
from_secret: git_password
2024-06-26 14:04:23 +00:00
gitea_url: https://gitea.dikurium.ch
gitea_username:
from_secret: git_username
notes_file: CZ_CURRENT_CHANGELOG.md
owner: innopeak
repo: drone-gitea-release
skip_if_no_notes_file: true
use_latest_git_tag: true
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