ab2b7ed5ac
- Add version variable to main.go, set via -X ldflags at build time - Pass version through to Server, used in the / endpoint response - Makefile passes VERSION from git describe - Dockerfile accepts VERSION build arg - Woodpecker passes CI_COMMIT_TAG as VERSION
35 lines
777 B
YAML
35 lines
777 B
YAML
when:
|
|
- event: tag
|
|
ref: refs/tags/v*
|
|
|
|
steps:
|
|
- name: docker-api
|
|
image: woodpeckerci/plugin-docker-buildx
|
|
settings:
|
|
registry: git.unkin.net
|
|
repo: git.unkin.net/unkin/artifactapi
|
|
build_args:
|
|
VERSION: ${CI_COMMIT_TAG}
|
|
username: droneci
|
|
password:
|
|
from_secret: DRONECI_PASSWORD
|
|
tags:
|
|
- ${CI_COMMIT_TAG}
|
|
- latest
|
|
|
|
- name: docker-web
|
|
image: woodpeckerci/plugin-docker-buildx
|
|
settings:
|
|
registry: git.unkin.net
|
|
repo: git.unkin.net/unkin/artifactapi-ui
|
|
dockerfile: ui/Dockerfile.ui
|
|
context: ui
|
|
build_args:
|
|
BASE_PATH: /ui
|
|
username: droneci
|
|
password:
|
|
from_secret: DRONECI_PASSWORD
|
|
tags:
|
|
- ${CI_COMMIT_TAG}
|
|
- latest
|