From 7b122f2706118903f1d83fc52b9f42e6083974ec Mon Sep 17 00:00:00 2001 From: Andrew Davidson Date: Wed, 8 Mar 2023 21:34:55 -0800 Subject: [PATCH] Adding CI files --- .woodpecker.yml | 17 +++++++++++++++++ build.sh | 21 +++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 .woodpecker.yml create mode 100755 build.sh diff --git a/.woodpecker.yml b/.woodpecker.yml new file mode 100644 index 0000000..683416e --- /dev/null +++ b/.woodpecker.yml @@ -0,0 +1,17 @@ +clone: + git: + image: plugins/git + depth: 1 +pipeline: + build: + image: docker + volumes: + - /var/run/docker.sock:/var/run/docker.sock + environment: + - PUSH_TOKEN=$${PUSH_TOKEN} + - PUSH_USER=$${PUSH_USER} + secrets: + - PUSH_TOKEN + - PUSH_USER + commands: + - /bin/sh build.sh diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..d8b6b10 --- /dev/null +++ b/build.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +CONTAINER_NAME=dockertools +CONTAINER_HOST=git.andr3w.net +CONTAINER_USER=amd + +echo "### MARK LOGIN " +echo $PUSH_TOKEN | docker login -u=$PUSH_USER --password-stdin $CONTAINER_HOST + +echo "### MAKE BUILDER" +docker buildx create --use --name builder + + +echo "### MARK BUILD AMD64" +docker buildx build --push \ + --platform linux/amd64,linux/arm64,linux/arm/v7 \ + -t $CONTAINER_HOST/$CONTAINER_USER/$CONTAINER_NAME \ + -t $CONTAINER_HOST/$CONTAINER_USER/$CONTAINER_NAME:latest \ + -t $CONTAINER_HOST/$CONTAINER_USER/$CONTAINER_NAME:$(date -I) \ + . +