ci: Refactor hardcoded content
This commit is contained in:
parent
bdf7b60d5c
commit
eb41a2e594
1 changed files with 8 additions and 6 deletions
14
.drone.yml
14
.drone.yml
|
@ -4,7 +4,7 @@ type: docker
|
||||||
name: default
|
name: default
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Build
|
- name: build:binary
|
||||||
image: crystallang/crystal:1.7.1
|
image: crystallang/crystal:1.7.1
|
||||||
volumes:
|
volumes:
|
||||||
- name: cache
|
- name: cache
|
||||||
|
@ -18,11 +18,13 @@ steps:
|
||||||
- mkdir -p /_cache/bin
|
- mkdir -p /_cache/bin
|
||||||
- cp -r bin/docmachine /_cache/bin
|
- cp -r bin/docmachine /_cache/bin
|
||||||
|
|
||||||
- name: Publish
|
- name: publish:tag
|
||||||
image: curlimages/curl
|
image: curlimages/curl
|
||||||
environment:
|
environment:
|
||||||
PACKAGE_TOKEN:
|
PACKAGE_UPLOAD_URL: https://code.apps.glenux.net/api/packages/glenux/generic/docmachine-utils
|
||||||
from_secret: PACKAGE_TOKEN
|
PACKAGE_BASENAME: docmachine
|
||||||
|
PACKAGE_UPLOAD_TOKEN:
|
||||||
|
from_secret: PACKAGE_UPLOAD_TOKEN
|
||||||
when:
|
when:
|
||||||
ref:
|
ref:
|
||||||
include:
|
include:
|
||||||
|
@ -33,9 +35,9 @@ steps:
|
||||||
commands:
|
commands:
|
||||||
- env |grep DRONE
|
- env |grep DRONE
|
||||||
- |
|
- |
|
||||||
curl -H "Authorization: token $PACKAGE_TOKEN" \
|
curl -H "Authorization: token $PACKAGE_UPLOAD_TOKEN" \
|
||||||
--upload-file /_cache/bin/docmachine \
|
--upload-file /_cache/bin/docmachine \
|
||||||
https://code.apps.glenux.net/api/packages/glenux/generic/docmachine-utils/$DRONE_TAG/docmachine
|
$PACKAGE_UPLOAD_URL/$DRONE_TAG/$PACKAGE_BASENAME
|
||||||
|
|
||||||
# FIXME: handle multi-arch
|
# FIXME: handle multi-arch
|
||||||
# FIXME: publish only on tags
|
# FIXME: publish only on tags
|
||||||
|
|
Loading…
Reference in a new issue