act_runner/run.sh
2025-04-01 15:27:02 +08:00

16 lines
649 B
Bash

git pull
curl -sSL https://git.martin98.com/MartinFarm/init/raw/branch/main/clean.sh | bash
docker pull docker.martin98.com/library/gitea/act_runner:latest
docker kill gitea_runner
docker rm gitea_runner
docker run \
-v $(pwd)/config.yaml:/config.yaml \
-v $(pwd)/data:/data \
--restart always \
-v /var/run/docker.sock:/var/run/docker.sock \
-e CONFIG_FILE=/config.yaml \
-e GITEA_INSTANCE_URL=https://git.martin98.com \
-e GITEA_RUNNER_REGISTRATION_TOKEN=1LMGNymS5zvlogNwupiZgZjlr8EZeHqzEnT3tnwL \
-e GITEA_RUNNER_NAME=${_AGENT} \
--name gitea_runner \
-d docker.martin98.com/library/gitea/act_runner:latest