diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4c49bd7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.env diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 0000000..f100718 --- /dev/null +++ b/compose.yaml @@ -0,0 +1,25 @@ +services: + runner: + image: docker.io/gitea/act_runner:nightly + container_name: gitea-action-runner + env_file: + - .env + environment: + CONFIG_FILE: /config.yaml + GITEA_INSTANCE_URL: "${GITEA_URL}" + GITEA_RUNNER_REGISTRATION_TOKEN: "${REGISTRATION_TOKEN}" + GITEA_RUNNER_NAME: "${GITEA_RUNNER_NAME}" + GITEA_RUNNER_LABELS: "${GITEA_RUNNER_LABELS}" + volumes: + - ./config.yaml:/config.yaml + - act_runner_data:/data + - /var/run/docker.sock:/var/run/docker.sock + security_opt: + - no-new-privileges:true + +volumes: + act_runner_data: {} + +networks: + backend: + external: true diff --git a/example.env b/example.env new file mode 100644 index 0000000..aed898f --- /dev/null +++ b/example.env @@ -0,0 +1,6 @@ +# https://docs.gitea.com/usage/actions/act-runner +REGISTRATION_TOKEN="your-token" +GITEA_URL="git.example.com" +GITEA_RUNNER_NAME="runner-name" +# https://docs.gitea.com/usage/actions/act-runner#labels +GITEA_RUNNER_LABELS="ubuntu-latest:docker://node:16-bullseye,ubuntu-22.04:docker://node:16-bullseye,ubuntu-20.04:docker://node:16-bullseye,ubuntu-18.04:docker://node:16-buster"