added gitea actions

This commit is contained in:
Philippe Loctaux 2023-07-05 22:38:45 +02:00
parent 8687fe36c0
commit 0d1be7cc16
2 changed files with 25 additions and 20 deletions

25
.gitea/workflows/ci.yml Normal file
View file

@ -0,0 +1,25 @@
name: Build
on: [push]
jobs:
build-docker:
runs-on: node-16-bullseye
container:
image: ubuntu:act-22.04-philt3r
steps:
- name: get code
uses: actions/checkout@v3
- name: QEMU
uses: docker/setup-qemu-action@v2
- name: Docker Buildx
uses: docker/setup-buildx-action@v2
with:
driver-opts: image=moby/buildkit:buildx-stable-1-philt3r
- name: Build and push
uses: docker/build-push-action@v4
env:
ACTIONS_RUNTIME_TOKEN: ''
with:
push: true
tags: ${{ gitea.server_url }}/${{ gitea.repository }}:latest

View file

@ -1,20 +0,0 @@
pipeline:
# build docker image with `latest` tag
docker-latest:
image: woodpeckerci/plugin-docker-buildx
settings:
registry: https://gitea.y.z.x4m3.rocks
username: ${CI_REPO_OWNER}
password:
from_secret: DOCKER_PASSWORD
repo: gitea.y.z.x4m3.rocks/${CI_REPO_OWNER}/plcom
tag: latest
# deploy
deploy-latest:
image: caprover/cli-caprover:2.2.3
commands:
- caprover deploy -u $CAPROVER_URL -a $CAPROVER_APP -i gitea.y.z.x4m3.rocks/${CI_REPO_OWNER}/plcom:latest
secrets: [ CAPROVER_URL, CAPROVER_APP_TOKEN, CAPROVER_APP ]
branches: master