From 852740193d3aea1b628d1db01747264449ad2752 Mon Sep 17 00:00:00 2001 From: Jonni Liljamo Date: Tue, 17 Oct 2023 16:48:54 +0300 Subject: [PATCH] feat: add build file --- .build.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .build.yml diff --git a/.build.yml b/.build.yml new file mode 100644 index 0000000..1db9a08 --- /dev/null +++ b/.build.yml @@ -0,0 +1,25 @@ +image: alpine/edge +packages: + - docker +sources: + - https://git.src.quest/~skye/felu +environment: + project: felu +secrets: + - ef58262b-f72b-460f-b417-42aed24fc67e +tasks: + - checks: | + cd $project + if (echo "$(git describe --tag)" | grep -v -Eq "^[0-9]+[.][0-9]+[.][0-9]+$"); then complete-build; fi + - setup: | + sudo rc-service docker start + sudo addgroup $(whoami) docker + - build: | + cd $project + export VERSION=$(git describe --tags) + docker build -t liljamo/"$project":"$VERSION" . --build-arg VERSION="$VERSION" + - push: | + cd $project + export VERSION=$(git describe --tags) + docker login --username liljamo --password-stdin < ~/.docker-hub-token + docker push liljamo/"$project":"$VERSION" -- 2.44.1