This commit is contained in:
parent
7ad87f3a7b
commit
04121edadb
2 changed files with 37 additions and 0 deletions
17
.woodpecker.yml
Normal file
17
.woodpecker.yml
Normal file
|
@ -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
|
20
build.sh
Normal file
20
build.sh
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
CONTAINER_NAME=ip-check
|
||||||
|
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"
|
||||||
|
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) \
|
||||||
|
.
|
Loading…
Reference in a new issue