Files
telegram-scam-baiter/.drone.yml
itzaname fc043fc770
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is failing
Oneliner for getting version
2025-10-03 23:36:23 -04:00

89 lines
2.1 KiB
YAML

kind: pipeline
type: docker
name: push-master
trigger:
event:
- push
branch:
- master
steps:
- name: docker-build-push
image: plugins/docker
settings:
registry: git.itzana.me
repo: git.itzana.me/cameronjgrant/telegram-scam-baiter
username:
from_secret: GITEA_USERNAME
password:
from_secret: GITEA_TOKEN
dockerfile: Dockerfile
context: .
tags:
- master
- latest
- ${DRONE_COMMIT_SHA}
when:
event:
- push
branch:
- master
---
kind: pipeline
type: docker
name: release-tag
trigger:
event:
- tag
steps:
- name: docker-build-push
image: plugins/docker
settings:
registry: git.itzana.me
repo: git.itzana.me/cameronjgrant/telegram-scam-baiter
username:
from_secret: GITEA_USERNAME
password:
from_secret: GITEA_TOKEN
dockerfile: Dockerfile
context: .
tags:
- ${DRONE_TAG}
- name: helm-package-and-push
image: alpine/helm:3.14.4
environment:
GITEA_USERNAME:
from_secret: GITEA_USERNAME
GITEA_TOKEN:
from_secret: GITEA_TOKEN
CHART_DIR: charts/telegram-scam-baiter
commands:
- apk add --no-cache bash coreutils git curl
- helm plugin install https://github.com/chartmuseum/helm-push
# Compute semver (strip leading "v" if present)
- |
VERSION="${DRONE_TAG#v}"; echo "Using version: $VERSION"
# Package the chart with version/appVersion = git tag (sans 'v')
- helm package "$CHART_DIR" \
--version "${VERSION}" \
--app-version "${VERSION}"
# Add the Gitea Helm repo with basic auth (stored in Helm config)
- helm repo add "${DRONE_REPO_NAME}" "https://git.itzana.me/api/packages/${DRONE_REPO_OWNER}/helm" \
--username "${GITEA_USERNAME}" \
--password "${GITEA_TOKEN}"
# Push the packaged chart to Gitea (ChartMuseum API-compatible)
- helm cm-push "telegram-scam-baiter-${VERSION}.tgz" "${DRONE_REPO_NAME}"
when:
event:
- tag