Skip to content
Snippets Groups Projects
Commit 85a32e74 authored by Thomas Schneider's avatar Thomas Schneider Committed by Thomas Schneider
Browse files

ci: Upload binaries to GitLab package registry

parent 0ad6359a
No related branches found
No related tags found
1 merge request!1Merge GitLab CI config
Pipeline #3245 failed
......@@ -3,6 +3,8 @@
variables:
GOCACHE: $CI_PROJECT_DIR/.gocache
GOPATH: $CI_PROJECT_DIR/.go
PACKAGE_REGISTRY_URL: >-
$CI_API_V4_URL/projects/$CI_PROJECT_ID/packages/generic/needrestart2prom
cache:
paths:
......@@ -47,3 +49,16 @@ lint:
reports:
junit: golangci-output.xml
expire_in: 7 days
upload:
stage: deploy
image: curlimages/curl:latest
needs:
- build
rules:
- if: '$CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH'
script:
- |
for file in $CI_PROJECT_NAME-linux-amd64 $CI_PROJECT_NAME-linux-arm; do
curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file ${file} ${PACKAGE_REGISTRY_URL}/${CI_COMMIT_REF}/${file} ;
done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment