replace drone ci
This commit is contained in:
@@ -1,10 +0,0 @@
|
|||||||
# Drone settings
|
|
||||||
DRONETAG=
|
|
||||||
|
|
||||||
## https://docs.drone.io/server/provider/gitea/
|
|
||||||
DRONE_GITEA_SERVER=https://git.example.com
|
|
||||||
DRONE_GITEA_CLIENT_ID=
|
|
||||||
DRONE_GITEA_CLIENT_SECRET=
|
|
||||||
DRONE_RPC_SECRET=
|
|
||||||
DRONE_SERVER_HOST=ci.example.com
|
|
||||||
DRONE_SERVER_PROTO=https
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
# gitea settings
|
|
||||||
GITTAG=
|
|
||||||
|
|
||||||
USER_UID=1000
|
|
||||||
USER_GID=1000
|
|
||||||
|
|
||||||
## preconfig for app.ini
|
|
||||||
## https://github.com/go-gitea/gitea/tree/main/contrib/environment-to-ini
|
|
||||||
44
README.md
44
README.md
@@ -53,8 +53,46 @@ docker service update git_drone --force
|
|||||||
git.example.com {
|
git.example.com {
|
||||||
reverse_proxy git:3000
|
reverse_proxy git:3000
|
||||||
}
|
}
|
||||||
|
```
|
||||||
|
|
||||||
ci.example.com {
|
## CI Deployment
|
||||||
reverse_proxy drone:80
|
Since version 1.19.x Gitea has a CI handler integrated.
|
||||||
}
|
These CI handler is mostly compatible with Github Actions.
|
||||||
|
|
||||||
|
Runner Setup: https://docs.gitea.com/usage/actions/act-runner
|
||||||
|
Usage: https://docs.gitea.com/usage/actions/quickstart
|
||||||
|
|
||||||
|
```
|
||||||
|
wget -O act_runner https://dl.gitea.com/act_runner/0.2.11/act_runner-0.2.11-linux-amd64
|
||||||
|
chmod +x act_runner
|
||||||
|
./act_runner --version
|
||||||
|
|
||||||
|
./act_runner generate-config > config.yml
|
||||||
|
# interactive setup
|
||||||
|
# ./act_runner --config config.yml register
|
||||||
|
|
||||||
|
./act_runner register --no-interactive --instance https://git.your.domain/ --token <token>
|
||||||
|
# ./act_runner register --no-interactive --instance <instance_url> --token <registration_token> --name <runner_name> --labels <runner_labels>
|
||||||
|
|
||||||
|
./act_runner --config config.yml daemon
|
||||||
|
```
|
||||||
|
|
||||||
|
Service File
|
||||||
|
```
|
||||||
|
[Unit]
|
||||||
|
Description=Gitea Actions runner
|
||||||
|
Documentation=https://gitea.com/gitea/act_runner
|
||||||
|
After=docker.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/local/bin/act_runner daemon --config /etc/act_runner/config.yaml
|
||||||
|
ExecReload=/bin/kill -s HUP $MAINPID
|
||||||
|
WorkingDirectory=/var/lib/act_runner
|
||||||
|
TimeoutSec=0
|
||||||
|
RestartSec=10
|
||||||
|
Restart=always
|
||||||
|
User=act_runner
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
```
|
```
|
||||||
@@ -6,7 +6,6 @@ services:
|
|||||||
image: gitea/gitea:${GITTAG:-latest}
|
image: gitea/gitea:${GITTAG:-latest}
|
||||||
container_name: git
|
container_name: git
|
||||||
env_file:
|
env_file:
|
||||||
- .git.env
|
|
||||||
- .env
|
- .env
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
@@ -25,28 +24,6 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
- backend
|
- backend
|
||||||
|
|
||||||
drone:
|
|
||||||
image: drone/drone:${DRONETAG:-latest}
|
|
||||||
container_name: drone
|
|
||||||
env_file:
|
|
||||||
- .drone.env
|
|
||||||
- .env
|
|
||||||
restart: unless-stopped
|
|
||||||
ports:
|
|
||||||
- 8080:80
|
|
||||||
- 8443:443
|
|
||||||
deploy:
|
|
||||||
replicas: 1
|
|
||||||
placement:
|
|
||||||
max_replicas_per_node: 1
|
|
||||||
update_config:
|
|
||||||
parallelism: 1
|
|
||||||
delay: 10s
|
|
||||||
volumes:
|
|
||||||
- ${BASEDIR:-.}/files/drone/:/data/
|
|
||||||
networks:
|
|
||||||
- backend
|
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
backend:
|
backend:
|
||||||
name: ${INTRANET:-backend}
|
name: ${INTRANET:-backend}
|
||||||
|
|||||||
Reference in New Issue
Block a user