From eb41a2e59431101a5f02e9c88dde1949fd224323 Mon Sep 17 00:00:00 2001 From: Glenn Date: Tue, 21 Mar 2023 22:29:05 +0100 Subject: [PATCH] ci: Refactor hardcoded content --- .drone.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.drone.yml b/.drone.yml index b13ecba..087a097 100644 --- a/.drone.yml +++ b/.drone.yml @@ -4,7 +4,7 @@ type: docker name: default steps: - - name: Build + - name: build:binary image: crystallang/crystal:1.7.1 volumes: - name: cache @@ -18,11 +18,13 @@ steps: - mkdir -p /_cache/bin - cp -r bin/docmachine /_cache/bin - - name: Publish + - name: publish:tag image: curlimages/curl environment: - PACKAGE_TOKEN: - from_secret: PACKAGE_TOKEN + PACKAGE_UPLOAD_URL: https://code.apps.glenux.net/api/packages/glenux/generic/docmachine-utils + PACKAGE_BASENAME: docmachine + PACKAGE_UPLOAD_TOKEN: + from_secret: PACKAGE_UPLOAD_TOKEN when: ref: include: @@ -33,9 +35,9 @@ steps: commands: - env |grep DRONE - | - curl -H "Authorization: token $PACKAGE_TOKEN" \ + curl -H "Authorization: token $PACKAGE_UPLOAD_TOKEN" \ --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: publish only on tags