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- 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