diff --git a/.gitea/gitea-ci.yaml b/.gitea/gitea-ci.yaml new file mode 100644 index 0000000..cfacc87 --- /dev/null +++ b/.gitea/gitea-ci.yaml @@ -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 \ No newline at end of file diff --git a/Makefile b/Makefile index a7b28f5..960ee9b 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ 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)) COMPOSE_FILES := $(shell find docker-compose*.yml | sed -e 's/^/--file /') diff --git a/docker-compose.gitea.yml b/docker-compose.gitea.yml index 291c673..a83a509 100644 --- a/docker-compose.gitea.yml +++ b/docker-compose.gitea.yml @@ -42,6 +42,24 @@ services: security_opt: - 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: gitea_data: name: gitea_data diff --git a/env/gitea-runner.env b/env/gitea-runner.env new file mode 100644 index 0000000..b5847ca --- /dev/null +++ b/env/gitea-runner.env @@ -0,0 +1,4 @@ +GITEA_INSTANCE_URL=https://git.bensuperpc.org +GITEA_RUNNER_REGISTRATION_TOKEN=TBGzS0m823Xk732zRqjrbcSWFTEPajj5V5OFzXWP +GITEA_RUNNER_NAME=runner-1 +#GITEA_RUNNER_LABELS= \ No newline at end of file diff --git a/env/gitea.env b/env/gitea.env index 6990f1f..616f1f9 100644 --- a/env/gitea.env +++ b/env/gitea.env @@ -4,4 +4,6 @@ GITEA__database__DB_TYPE=mysql GITEA__database__HOST=database_gitea:3306 GITEA__database__NAME=gitea GITEA__database__USER=bensuperpc -GITEA__database__PASSWD=K7s5yoHknnEd7vsZoxb8I3dK9mjToF1j \ No newline at end of file +GITEA__database__PASSWD=K7s5yoHknnEd7vsZoxb8I3dK9mjToF1j +#GITEA__security__SECRET_KEY= +#GITEA__security__INTERNAL_TOKEN= \ No newline at end of file