Files
AnthoLume/.drone.yml
Evan Reichard ff44db311d
All checks were successful
continuous-integration/drone/push Build is passing
chore: better tags
2026-07-03 13:59:22 -04:00

50 lines
1.0 KiB
YAML

kind: pipeline
type: docker
name: default
trigger:
ref:
- refs/heads/master
- refs/tags/**
- refs/pull/**
steps:
# Unit Tests
- name: tests
image: golang
commands:
- make tests
# Fetch tags
- name: fetch tags
image: alpine/git
commands:
- git fetch --tags
# Compute docker tag: git tag for tag builds, pr-<num> for PRs, dev for master
- name: compute tags
image: alpine
commands:
- |
if [ "$DRONE_BUILD_EVENT" = "tag" ]; then
echo "$DRONE_TAG" > .tags
elif [ "$DRONE_BUILD_EVENT" = "pull_request" ]; then
echo "pr-$DRONE_PULL_REQUEST" > .tags
else
echo "dev" > .tags
fi
- cat .tags
# Publish docker image
- name: publish docker
image: plugins/docker
settings:
repo: gitea.va.reichard.io/evan/antholume
registry: gitea.va.reichard.io
custom_dns:
- 8.8.8.8
username:
from_secret: docker_username
password:
from_secret: docker_password