From c4f023b6a80afdf7ef93bd4f8e36f3e4e8c3a805 Mon Sep 17 00:00:00 2001 From: Mario Constanti Date: Tue, 21 May 2024 12:06:54 +0200 Subject: [PATCH] doc: add some notes about default labels Signed-off-by: Mario Constanti --- doc/labels.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 doc/labels.md diff --git a/doc/labels.md b/doc/labels.md new file mode 100644 index 00000000..04165c8c --- /dev/null +++ b/doc/labels.md @@ -0,0 +1,15 @@ +# Labels and Tags + +Github Runners can be tagged with labels. These labels can be used to restrict the jobs that can run on a runner. For example, you can have a runner with the label `linux` and another with the label `windows`. You can then restrict a job to run only on a runner with the label `linux`. + +Whenever a new runner register themselves on Github, the runner knows its own labels as the labels are defined in the pool specification as tags. + +Beside the custom labels, Github also has some predefined labels that are appended by the runner script per default. +These are: +```yaml +[ 'self-hosted', '$OS_TYPE', '$OS_ARCH' ] +``` + +With Version **TBD** of `garm-provider-common`, the runner script will register themselves with a new command line flag, called `--no-default-labels`. If this flag is set, the runner will not append any default label. + +As all labels can be defined in the pool specification, it's still possible to add the default labels manually.