Switch to Codeberg CI

This commit is contained in:
video-prize-ranch 2022-07-13 14:17:23 -04:00
parent 0d1bf4a008
commit 18c2c88d9f
No known key found for this signature in database
GPG Key ID: D8EAA4C5B12A7281
3 changed files with 29 additions and 29 deletions

View File

@ -1,29 +0,0 @@
variables:
REPO_NAME: codeberg.org/video-prize-ranch/rimgo
DOCKER_HOST: tcp://docker:2375
stages:
- build
- deploy
docker:
image: docker:20
stage: build
services:
- name: docker:20-dind
command: ["--experimental"]
before_script:
- mkdir -p ~/.docker/cli-plugins
- wget -O ~/.docker/cli-plugins/docker-buildx https://github.com/docker/buildx/releases/download/v0.8.1/buildx-v0.8.1.linux-amd64
- chmod +x ~/.docker/cli-plugins/docker-buildx
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker context create mybuilder
- docker buildx create --use --name mybuilder mybuilder
- docker buildx build --platform linux/amd64,linux/arm64 --push -t $CI_REGISTRY_IMAGE:latest .
- docker create --name tmp $CI_REGISTRY_IMAGE:latest
- docker cp tmp:/app/rimgo rimgo
- docker rm -f tmp
artifacts:
paths:
- rimgo

14
.woodpecker/.build.yml Normal file
View File

@ -0,0 +1,14 @@
pipeline:
build:
image: woodpeckerci/plugin-docker-buildx
settings:
dockerfile: Dockerfile
registry: https://registry.gitlab.com/
repo: registry.gitlab.com/overtime-zone-wildfowl/rimgo
platforms: linux/amd64,linux/arm64
tag: latest
username:
from_secret: docker_username
password:
from_secret: docker_password
secrets: [docker_username, docker_password]

15
.woodpecker/.deploy.yml Normal file
View File

@ -0,0 +1,15 @@
pipeline:
deploy:
image: alpine:latest
commands:
- apk update && apk --no-cache add curl git
- wget -O - https://fly.io/install.sh | sh
- git clone https://codeberg.org/video-prize-ranch/fly-cfg.git
- cd fly-cfg
- /root/.fly/bin/flyctl deploy --detach
secrets: [fly_api_token]
depends_on:
- build
skip_clone: true