From 190c9738c33f5901fc49101a46dd057e95e53928 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Fri, 26 May 2023 16:41:10 +0200 Subject: [PATCH] update ci configuration --- .woodpecker.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 80db0fe..9d8cf27 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -1,15 +1,21 @@ +variables: + - &golang "golang:1.19" + pipeline: test: - image: golang:1.19 + image: *golang commands: - go test -v build: - image: golang:1.19 + image: *golang + environment: + TAG: ${CI_COMMIT_TAG:-latest} commands: - go build - ART=/artifacts/deblan/capture - test -d $ART || mkdir $ART - - cp capture $ART/capture-${CI_COMMIT_SHA:0:8} + - cp capture $ART/capture-latest + - test -z ${CI_COMMIT_TAG} && cp capture $ART/capture-$TAG || true volumes: - /var/www/html/artifacts:/artifacts