mirror of
https://github.com/actions/runner.git
synced 2025-12-10 20:36:49 +00:00
1.2 KiB
1.2 KiB
Basic setup
You'll need a runner compatible with hooks, a repository with container workflows to which you can register the runner and the hooks from this repository.
Getting Started
- Run
npm install && npm run bootstrapto setup your environment and install all the needed packages - Run
npm run lintandnpm run formatto ensure your charges will pass CI - Run
npm run build-allto build and test end to end.
E2E
- You'll need a runner compatible with hooks, a repository with container workflows to which you can register the runner and the hooks from this repository.
- See the runner contributing.md for how to get started with runner development.
- Build your hook using
npm run build - Enable the hooks by setting
ACTIONS_RUNNER_CONTAINER_HOOK=./src/{libraryname}/dist/index.jsfile generated by ncc - Configure your self hosted runner against the a repository you have admin access
- Run a workflow with a container job, for example
name: myjob
on:
workflow_dispatch:
jobs:
my_job:
runs-on: self-hosted
services:
redis:
image: redis
container:
image: alpine:3.15
options: --cpus 1
steps:
- run: pwd