Add gitea runner

Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
This commit is contained in:
Bensuperpc 2024-05-12 14:45:04 +02:00
parent b101480a01
commit 2df1d52ffb
No known key found for this signature in database
GPG Key ID: 15D0B1525584D383
5 changed files with 41 additions and 2 deletions

15
.gitea/gitea-ci.yaml Normal file
View File

@ -0,0 +1,15 @@
name: Build And Test
run-name: ${{ gitea.actor }} is runs ci pipeline
# on: [ push, pull_request ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- run: ls
publish:
runs-on: cth-ubuntu-latest
needs: build
if: gitea.ref == 'refs/heads/main'
steps:
- run: ls

View File

@ -13,7 +13,7 @@
DOCKER := docker DOCKER := docker
PROFILES := caddy wordpress gitea adminer uptime-kuma qbittorrent jellyfin watchtower backup syncthing openssh PROFILES := caddy wordpress gitea adminer uptime-kuma qbittorrent jellyfin watchtower backup syncthing openssh gitea-runner
PROFILE_CMD := $(addprefix --profile ,$(PROFILES)) PROFILE_CMD := $(addprefix --profile ,$(PROFILES))
COMPOSE_FILES := $(shell find docker-compose*.yml | sed -e 's/^/--file /') COMPOSE_FILES := $(shell find docker-compose*.yml | sed -e 's/^/--file /')

View File

@ -42,6 +42,24 @@ services:
security_opt: security_opt:
- no-new-privileges:true - no-new-privileges:true
# Gitea-runner
gitea-runner:
image: gitea/act_runner:latest
container_name: gitea-runner
profiles:
- gitea
depends_on:
- gitea
restart: on-failure:5
env_file:
- env/gitea-runner.env
volumes:
- /var/run/docker.sock:/var/run/docker.sock
networks:
- infra-network
security_opt:
- no-new-privileges:true
volumes: volumes:
gitea_data: gitea_data:
name: gitea_data name: gitea_data

4
env/gitea-runner.env vendored Normal file
View File

@ -0,0 +1,4 @@
GITEA_INSTANCE_URL=https://git.bensuperpc.org
GITEA_RUNNER_REGISTRATION_TOKEN=TBGzS0m823Xk732zRqjrbcSWFTEPajj5V5OFzXWP
GITEA_RUNNER_NAME=runner-1
#GITEA_RUNNER_LABELS=

4
env/gitea.env vendored
View File

@ -4,4 +4,6 @@ GITEA__database__DB_TYPE=mysql
GITEA__database__HOST=database_gitea:3306 GITEA__database__HOST=database_gitea:3306
GITEA__database__NAME=gitea GITEA__database__NAME=gitea
GITEA__database__USER=bensuperpc GITEA__database__USER=bensuperpc
GITEA__database__PASSWD=K7s5yoHknnEd7vsZoxb8I3dK9mjToF1j GITEA__database__PASSWD=K7s5yoHknnEd7vsZoxb8I3dK9mjToF1j
#GITEA__security__SECRET_KEY=
#GITEA__security__INTERNAL_TOKEN=