Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
188 commits
Select commit Hold shift + click to select a range
73805dd
link: actions/runner#...
jsoref Jan 22, 2026
fe556c5
link: joelparkerhenderson/architecture-decision-record
jsoref Jan 22, 2026
d492893
link: dotnet load SSL CA certificates on each OS
jsoref Jan 22, 2026
4e982fe
link: automate your use of self-hosted runners
jsoref Jan 22, 2026
b9dd200
Add space between `//` and comment
jsoref Feb 9, 2026
85b1bfe
spelling: a string to the method
jsoref Jan 22, 2026
2564ff0
spelling: a
jsoref Jan 22, 2026
bf76b92
spelling: able to
jsoref Feb 9, 2026
ba60902
spelling: accidentally
jsoref Jan 22, 2026
63571e8
spelling: account
jsoref Jan 22, 2026
905bd83
spelling: act
jsoref Jan 22, 2026
4b08307
spelling: administrator
jsoref Jan 22, 2026
be6f946
spelling: all
jsoref Jan 22, 2026
00f3cb0
spelling: already
jsoref Jan 22, 2026
c3edbef
spelling: always
jsoref Jan 22, 2026
f328dea
spelling: an
jsoref Jan 22, 2026
95d56ba
spelling: anchors
jsoref Jan 22, 2026
a6ec286
spelling: arg-string
jsoref Jan 23, 2026
13d10a7
spelling: available
jsoref Jan 23, 2026
0cda522
spelling: be
jsoref Jan 22, 2026
4187655
spelling: believe
jsoref Jan 23, 2026
6653767
spelling: belonging
jsoref Jan 23, 2026
2641d2b
spelling: boundary
jsoref Jan 23, 2026
1d96a4a
spelling: buffered
jsoref Jan 23, 2026
c1bc48c
spelling: by design the data scheme is excluded from this list and th…
jsoref Jan 22, 2026
a8bd5fc
spelling: cache
jsoref Jan 23, 2026
f81c966
spelling: call
jsoref Jan 23, 2026
9fedc1c
spelling: cancel
jsoref Jan 23, 2026
799aa7d
spelling: cancellation
jsoref Jan 23, 2026
01a333e
spelling: cannot
jsoref Jan 22, 2026
4cefe40
spelling: case-insensitive
jsoref Jan 22, 2026
77bb4e6
spelling: case-sensitive
jsoref Jan 22, 2026
22dec93
spelling: coalesce
jsoref Jan 23, 2026
8eb7c32
spelling: comparer
jsoref Jan 23, 2026
07d2251
spelling: comparison
jsoref Jan 23, 2026
30a1580
spelling: compatible
jsoref Jan 23, 2026
5af7bff
spelling: configuration
jsoref Jan 23, 2026
f9f654d
spelling: constructing
jsoref Jan 23, 2026
2e3a64d
spelling: constructor
jsoref Jan 23, 2026
4237d00
spelling: containing
jsoref Jan 23, 2026
98d83bd
spelling: context
jsoref Jan 23, 2026
2bceb0e
spelling: convention
jsoref Jan 23, 2026
4323c83
spelling: converter
jsoref Jan 23, 2026
35fcb07
spelling: credential
jsoref Jan 23, 2026
fb710df
spelling: deconfigure
jsoref Jan 22, 2026
f13b65e
spelling: deconfigures
jsoref Jan 23, 2026
bc85aa8
spelling: default
jsoref Jan 23, 2026
033949b
spelling: definition
jsoref Jan 23, 2026
a4c39cb
spelling: dependencies
jsoref Jan 23, 2026
bb1a738
spelling: dependent
jsoref Jan 23, 2026
edd2f06
spelling: dependents
jsoref Jan 23, 2026
bb3858b
spelling: deserialization
jsoref Jan 23, 2026
fb74170
spelling: determine the result of the runner update based on the log …
jsoref Jan 23, 2026
c859afb
spelling: determined
jsoref Jan 23, 2026
7047ff3
spelling: determines
jsoref Jan 23, 2026
bd04b96
spelling: diagnostic
jsoref Jan 23, 2026
4ebb14b
spelling: directory
jsoref Jan 23, 2026
d861212
spelling: distinguish
jsoref Jan 23, 2026
346d4c6
spelling: distributions
jsoref Jan 23, 2026
e77afcc
spelling: does not exist
jsoref Jan 22, 2026
63b38c5
spelling: empty
jsoref Jan 23, 2026
ff3bded
spelling: end
jsoref Jan 22, 2026
f97eb6f
spelling: ends
jsoref Jan 22, 2026
abf04c5
spelling: enumerable
jsoref Jan 23, 2026
cea0d14
spelling: env
jsoref Jan 23, 2026
2d4ded7
spelling: equal
jsoref Jan 22, 2026
ae6e8c9
spelling: equals
jsoref Jan 22, 2026
cd91126
spelling: equivalent
jsoref Jan 23, 2026
36c65b5
spelling: errors
jsoref Jan 23, 2026
66c5a63
spelling: etc.
jsoref Jan 23, 2026
cc6d21d
spelling: evaluate
jsoref Jan 23, 2026
38eb996
spelling: evaluation
jsoref Jan 23, 2026
8e363e4
spelling: exception
jsoref Jan 23, 2026
211f8fb
spelling: exchanges
jsoref Jan 23, 2026
2751fce
spelling: explicitly
jsoref Jan 23, 2026
665dbc0
spelling: expression
jsoref Jan 23, 2026
4f570ef
spelling: failure
jsoref Jan 23, 2026
858685d
spelling: fall back
jsoref Jan 22, 2026
984fcfd
spelling: full
jsoref Jan 23, 2026
d3b50eb
spelling: function
jsoref Jan 23, 2026
50e130b
spelling: further
jsoref Jan 23, 2026
3d3309d
spelling: guarantee
jsoref Jan 23, 2026
7f78cf3
spelling: hierarchically
jsoref Jan 23, 2026
4268e9e
spelling: how
jsoref Jan 22, 2026
8124b31
spelling: identifier
jsoref Jan 23, 2026
93d77ad
spelling: identities
jsoref Jan 23, 2026
c317075
spelling: image
jsoref Jan 23, 2026
746263b
spelling: implicitly
jsoref Jan 23, 2026
3a8a8f0
spelling: in order
jsoref Jan 23, 2026
84ede1b
spelling: incoming result is worse or equal, so use it
jsoref Feb 9, 2026
5cd6b0c
spelling: individual
jsoref Jan 23, 2026
f3afa38
spelling: inherited
jsoref Jan 23, 2026
a5df192
spelling: initialization
jsoref Jan 23, 2026
ea0c1b2
spelling: input
jsoref Jan 23, 2026
76b1066
spelling: insecure
jsoref Jan 22, 2026
b23807a
spelling: insensitive
jsoref Jan 23, 2026
e01284c
spelling: internals visible to
jsoref Jan 23, 2026
8233292
spelling: interrupt
jsoref Jan 23, 2026
27df474
spelling: javascript
jsoref Jan 22, 2026
1c0b9cc
spelling: job request
jsoref Jan 23, 2026
e16c12e
spelling: junction
jsoref Jan 23, 2026
f5200ab
spelling: know
jsoref Feb 9, 2026
9bbce09
spelling: locked until
jsoref Jan 23, 2026
adee599
spelling: lowercase
jsoref Jan 22, 2026
9d906a1
spelling: lt
jsoref Jan 23, 2026
a458054
spelling: macos
jsoref Jan 25, 2026
3505b7e
spelling: media type
jsoref Jan 23, 2026
4a979dc
spelling: message
jsoref Jan 23, 2026
c7de957
spelling: navigable
jsoref Jan 23, 2026
cc21399
spelling: necessarily
jsoref Jan 23, 2026
0fd148c
spelling: necessary
jsoref Jan 23, 2026
6ec0c23
spelling: neither-nor
jsoref Jan 22, 2026
4028021
spelling: nonexistent
jsoref Jan 23, 2026
41c3169
spelling: null check
jsoref Jan 25, 2026
33e45f0
spelling: oauth
jsoref Jan 23, 2026
ab383b2
spelling: occurred
jsoref Jan 23, 2026
dff958d
spelling: one
jsoref Jan 22, 2026
54a0212
spelling: optimize
jsoref Jan 22, 2026
9800793
spelling: optionally
jsoref Jan 23, 2026
207c8a3
spelling: otherwise
jsoref Jan 23, 2026
613392a
spelling: out-of-date
jsoref Jan 22, 2026
1962211
spelling: overridden
jsoref Jan 23, 2026
a99935e
spelling: parameter
jsoref Jan 23, 2026
b23391a
spelling: parameters
jsoref Jan 23, 2026
a72ebca
spelling: permission
jsoref Jan 23, 2026
bddd9c6
spelling: platform
jsoref Jan 23, 2026
bc16607
spelling: position
jsoref Jan 23, 2026
e4daa20
spelling: post job
jsoref Jan 23, 2026
bf2efe5
spelling: prompt
jsoref Jan 23, 2026
257058f
spelling: property
jsoref Jan 23, 2026
bc7265d
spelling: quarter
jsoref Jan 23, 2026
ca00a6f
spelling: questions
jsoref Jan 23, 2026
e5b1100
spelling: range of
jsoref Jan 22, 2026
3811df1
spelling: received
jsoref Jan 23, 2026
1295ab8
spelling: red hat
jsoref Jan 22, 2026
10a9aee
spelling: represents
jsoref Jan 23, 2026
fbf64ef
spelling: requests
jsoref Jan 23, 2026
9954b59
spelling: resiliency
jsoref Jan 23, 2026
96be6a6
spelling: retrieve
jsoref Jan 23, 2026
08fbb5e
spelling: retrieving
jsoref Jan 23, 2026
91824fe
spelling: retryable
jsoref Jan 25, 2026
df83bda
spelling: reusable
jsoref Jan 23, 2026
4471968
spelling: rules
jsoref Jan 25, 2026
7e466f9
spelling: satisfied
jsoref Jan 23, 2026
cad6449
spelling: separate
jsoref Jan 23, 2026
f291273
spelling: separated
jsoref Jan 23, 2026
a6e44e1
spelling: separator
jsoref Jan 23, 2026
b8bcab5
spelling: serialize
jsoref Jan 23, 2026
1249728
spelling: service
jsoref Jan 23, 2026
bad216c
spelling: set up
jsoref Jan 22, 2026
8102c03
spelling: similar
jsoref Jan 23, 2026
ac38e79
spelling: simply
jsoref Jan 23, 2026
e733efc
spelling: something
jsoref Jan 23, 2026
0acefcf
spelling: specific
jsoref Jan 23, 2026
aa9f858
spelling: step host
jsoref Jan 23, 2026
29806cc
spelling: successfully
jsoref Jan 23, 2026
6c138a9
spelling: supported
jsoref Jan 23, 2026
d02860b
spelling: surrogate
jsoref Jan 23, 2026
c95606b
spelling: synchronization
jsoref Jan 23, 2026
2f9bbf8
spelling: than
jsoref Jan 22, 2026
fe92a23
spelling: the type of the field to which the path maps
jsoref Jan 22, 2026
c4bf2db
spelling: the
jsoref Jan 22, 2026
fea6a81
spelling: then
jsoref Jan 22, 2026
75483f0
spelling: timeout
jsoref Jan 23, 2026
0301a3d
spelling: to remove runner running as windows
jsoref Feb 10, 2026
78c3065
spelling: to
jsoref Jan 22, 2026
0c873fe
spelling: todo
jsoref Jan 23, 2026
4a8a989
spelling: two
jsoref Jan 22, 2026
1cfe5ed
spelling: typescript
jsoref Jan 22, 2026
5cafc98
spelling: unattended
jsoref Jan 23, 2026
3c71663
spelling: uninstall
jsoref Feb 9, 2026
b1ecf68
spelling: unmodified
jsoref Jan 22, 2026
fcc1cc3
spelling: unnecessarily
jsoref Jan 23, 2026
98ebdc5
spelling: unnecessary
jsoref Jan 22, 2026
8597d59
spelling: unsanitized
jsoref Jan 23, 2026
dca185f
spelling: until locked-until
jsoref Jan 25, 2026
2d8727b
spelling: unzip
jsoref Jan 22, 2026
8309189
spelling: update
jsoref Jan 23, 2026
d432566
spelling: uri
jsoref Feb 10, 2026
0586213
spelling: value
jsoref Jan 23, 2026
ecf0904
spelling: variables
jsoref Jan 23, 2026
26fcbcb
spelling: warnings
jsoref Jan 23, 2026
57b79dd
spelling: well-formed absolute
jsoref Jan 22, 2026
c05380e
spelling: when
jsoref Jan 22, 2026
3dfbc54
spelling: whether or not
jsoref Jan 22, 2026
e0ceb25
spelling: with the
jsoref Jan 23, 2026
e606289
spelling: workflow
jsoref Jan 23, 2026
fb5807e
spelling: written
jsoref Jan 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/adrs/0276-problem-matchers.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ Coalesce empty with \"error\". For any other values, omit logging an issue and d

#### Default severity level

Problem matchers are unable to interpret severity strings other than `warning` and `error`. The `severity` match group expects `warning` or `error` (case insensitive).
Problem matchers are unable to interpret severity strings other than `warning` and `error`. The `severity` match group expects `warning` or `error` (case-insensitive).

However some tools indicate error/warning in different ways. For example `flake8` uses codes like `E100`, `W200`, and `F300` (error, warning, fatal, respectively).

Expand Down
2 changes: 1 addition & 1 deletion docs/adrs/0279-hashFiles-expression-function.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
**Status**: Accepted

## Context
First party action `actions/cache` needs a input which is an explicit `key` used for restoring and saving the cache. For packages caching, the most common `key` might be the hash result of contents from all `package-lock.json` under `node_modules` folder.
First party action `actions/cache` needs an input which is an explicit `key` used for restoring and saving the cache. For packages caching, the most common `key` might be the hash result of contents from all `package-lock.json` under `node_modules` folder.

There are serval different ways to get the hash `key` input for `actions/cache` action.

Expand Down
2 changes: 1 addition & 1 deletion docs/adrs/0297-base64-masking-trailing-characters.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ This will result in us only revealing length or bit information when a prefix or

## Consequences

- In the case where a secret has a prefix or suffix added before base64 encoding, we may now reveal up to 20 bits of information and the length of the original string modulo 3, rather then the original 16 bits and no length information
- In the case where a secret has a prefix or suffix added before base64 encoding, we may now reveal up to 20 bits of information and the length of the original string modulo 3, rather than the original 16 bits and no length information
- Secrets with a suffix appended before encoding will now be masked across the board. Previously it was only masked if it was a multiple of 3 characters
- Performance will suffer in a negligible way
2 changes: 1 addition & 1 deletion docs/adrs/0549-composite-run-steps.md
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ runs:

**We will not support "timeout-minutes" in a composite action for now. This functionality will be focused on in a future ADR.**

A composite action in its entirety is a job. You can set both timeout-minutes for the whole composite action or its steps as long as the sum of the `timeout-minutes` for each composite action step that has the attribute `timeout-minutes` is less than or equals to `timeout-minutes` for the composite action. There is no default timeout-minutes for each composite action step.
A composite action in its entirety is a job. You can set both timeout-minutes for the whole composite action or its steps as long as the sum of the `timeout-minutes` for each composite action step that has the attribute `timeout-minutes` is less than or equal to `timeout-minutes` for the composite action. There is no default timeout-minutes for each composite action step.

If the time taken for any of the steps in combination or individually exceeds the whole composite action `timeout-minutes` attribute, the whole job will fail (1). If an individual step exceeds its own `timeout-minutes` attribute but the total time that has been used including this step is below the overall composite action `timeout-minutes`, the individual step will fail but the rest of the steps will run based on their own `timeout-minutes` attribute (they will still abide by condition (1) though).

Expand Down
4 changes: 2 additions & 2 deletions docs/adrs/1144-composite-actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ We released [composite run steps](https://github.com/actions/runner/pull/554) la

We want to support the `uses` steps from workflows in composite actions, including:
- Container actions
- Javascript actions
- JavaScript actions
- Other Composite actions (up to a limit of course!)
- The pre and post steps these actions can generate

Expand Down Expand Up @@ -80,7 +80,7 @@ We want to support the `uses` steps from workflows in composite actions, includi

### Defaults - Not being considered at this time

- In actions, we have the idea of [defaults](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#defaultsrun) , which allow you to specify a shell and working directory in one location, rather then on each step.
- In actions, we have the idea of [defaults](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#defaultsrun) , which allow you to specify a shell and working directory in one location, rather than on each step.
- However, `shell` is currently required in composite run steps
- In regular run steps, it is optional, and defaults to a different value based on the OS.
- We want to prioritize the right experience for the consumer, and make the action author continue to explicitly set these values. We can consider improving this experience in the future.
Expand Down
6 changes: 3 additions & 3 deletions docs/adrs/1438-conditional-composite.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ However, one of the [most requested features](https://github.com/actions/runner/
### Goals
- We want to keep consistent with current behavior
- We want to support conditionals via the `if` keyword
- Our built in functions like `success` should be implementable without calling them, for example you can do `job.status == success` rather then `success()` currently.
- Our built in functions like `success` should be implementable without calling them, for example you can do `job.status == success` rather than `success()` currently.

### How does composite currently work?

Expand All @@ -32,7 +32,7 @@ Lets formalize that concept into a "real" idea.

- We will add an `action_status` field to the github context to mimic the [job's context status](https://docs.github.com/en/actions/learn-github-actions/contexts#job-context).
- We have an existing concept that does this `action_path` which is only set for composite actions on the github context.
- In a composite action during a main step, the `success()` function will check if `action_status == success`, rather then `job_status == success`. Failure will work the same way.
- In a composite action during a main step, the `success()` function will check if `action_status == success`, rather than `job_status == success`. Failure will work the same way.
- Pre and post steps in composite actions will not change, they will continue to check the job status.


Expand All @@ -57,7 +57,7 @@ For example, lets imagine a scenario with a simple nested composite action
The child composite actions steps should run in this example, the child composite action has not yet failed, so it should run all steps until a step fails. This is consistent with how a composite action currently works in production if the main job fails but a composite action is invoked with `if:always()` or `if: failure()`

### Other options explored
We could add the `current_step_status` to the job context rather then `__status` to the steps context, however this comes with two major downsides:
We could add the `current_step_status` to the job context rather than `__status` to the steps context, however this comes with two major downsides:
- We need to support the field for every type of step, because its non trivial to remove a field from the job context once it has been added (its readonly)
- For all actions besides composite it would only every be `success`
- Its weird to have a `current_step` value on the job context
Expand Down
20 changes: 10 additions & 10 deletions docs/adrs/1751-runner-job-hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,30 @@

## Context

This ADR details the design changes for supporting custom configurable hooks for on various runner events. This has been a long requested user feature [here](https://github.com/actions/runner/issues/1543), [here](https://github.com/actions/runner/issues/699) and [here](https://github.com/actions/runner/issues/1116) for users to have more information on runner observability, and for the ability to run cleanup and teardown jobs.
This ADR details the design changes for supporting custom configurable hooks for on various runner events. This has been a long requested user feature ([actions/runner#699](https://github.com/actions/runner/issues/699) [actions/runner#1116](https://github.com/actions/runner/issues/1116), and [actions/runner#1543](https://github.com/actions/runner/issues/1543)) for users to have more information on runner observability, and for the ability to run cleanup and teardown jobs.

This feature is mainly intended for self hosted runner administrators.

**What we hope to solve with this feature**
1. A runner admininstrator is able to add custom scripts to cleanup their runner environment at the start or end of a job
2. A runner admininstrator is able to add custom scripts to help setup their runner environment at the beginning of a job, for reasons like [caching](https://github.com/actions/runner/issues/1543#issuecomment-1050346279)
1. A runner administrator is able to add custom scripts to cleanup their runner environment at the start or end of a job
2. A runner administrator is able to add custom scripts to help setup their runner environment at the beginning of a job, for reasons like [caching](https://github.com/actions/runner/issues/1543#issuecomment-1050346279)
3. A runner administrator is able to grab custom telemetry of jobs running on their self hosted runner

**What we don't think this will solve**
- Policy features that require certain steps run at the beginning or end of all jobs
- This would be better solved to in a central place in settings, rather then decentralized on each runner.
- The Proposed `Notification Hooks for Runners` is limited to self hosted runners, we don't beileve Policy features should be
- Reuse scenarios between jobs are covered by [composite actions](https://docs.github.com/en/actions/creating-actions/creating-a-composite-action) and [resuable workflows](https://docs.github.com/en/actions/using-workflows/reusing-workflows)
- This would be better solved to in a central place in settings, rather than decentralized on each runner.
- The Proposed `Notification Hooks for Runners` is limited to self hosted runners, we don't believe Policy features should be
- Reuse scenarios between jobs are covered by [composite actions](https://docs.github.com/en/actions/creating-actions/creating-a-composite-action) and [reusable workflows](https://docs.github.com/en/actions/using-workflows/reusing-workflows)
- Security applications, security should be handled on the policy side on the server, not decentralized on each runner

## Hooks
- We will expose 2 variables that users can set to enable hooks
- We will expose two variables that users can set to enable hooks
- `ACTIONS_RUNNER_HOOK_JOB_STARTED`
- `ACTIONS_RUNNER_HOOK_JOB_COMPLETED`

You can set these variables to the **absolute** path of a `.sh` or `.ps1` file.

We will execute `pwsh` (fallback to `powershell`) or `bash` (fallback to `sh`) as appropriate.
We will execute `pwsh` (fall back to `powershell`) or `bash` (fall back to `sh`) as appropriate.
- `.sh` files will execute with the args `-e {pathtofile}`
- `.ps1` files will execute with the args `-command \". '{pathtofile}'\"`

Expand Down Expand Up @@ -63,7 +63,7 @@ These are **synchronous** hooks, so they will block job execution while they are
- There will be no support for `continue-on-error`

## Key Decisions
- We will expose 2 variables that users can set to enable hooks
- We will expose two variables that users can set to enable hooks
- `ACTIONS_RUNNER_HOOK_JOB_STARTED`
- `ACTIONS_RUNNER_HOOK_JOB_COMPLETED`
- Users can set these variables to the path of a `.sh` or `.ps1` file, which we will execute when Jobs are started or completed.
Expand All @@ -73,7 +73,7 @@ These are **synchronous** hooks, so they will block job execution while they are
- These files will execute as the Runner user, outside of any container specification on the job
- These are **synchronous** hooks
- Runner admins can execute a background process for async hooks if they want
- We will fail the job and halt execution on any exit code that is not 0. The Runner admin is responsible for returning the correct exit code and ensuring resilency.
- We will fail the job and halt execution on any exit code that is not 0. The Runner admin is responsible for returning the correct exit code and ensuring resiliency.
- This includes that the runner user needs access to the file in the env and the file must exist
- There will be no `continue-on-error` type option on launch
- There will be no `timeout` option on launch
Expand Down
14 changes: 7 additions & 7 deletions docs/adrs/1891-container-hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
# Background

[Job Hooks](https://github.com/actions/runner/blob/main/docs/adrs/1751-runner-job-hooks.md) have given users the ability to customize how their self hosted runners run a job.
Users also want the ability to customize how they run containers during the scope of the job, rather then being locked into the docker implementation we have in the runner. They may want to use podman, kubernetes, or even change the docker commands we run.
We should give them that option, and publish examples how how they can create their own hooks.
Users also want the ability to customize how they run containers during the scope of the job, rather than being locked into the docker implementation we have in the runner. They may want to use podman, kubernetes, or even change the docker commands we run.
We should give them that option, and publish examples how they can create their own hooks.

# Guiding Principles
- **Extensibility** is the focus, we need to make sure we are flexible enough to cover current and future scenarios, even at the cost of making it harder to utilize these hooks
Expand Down Expand Up @@ -46,7 +46,7 @@ All text written to stdout or stderr should appear in the job or step logs. With
1. Wrapping the json in some unique tag and processing it like we do commands
2. Writing to a file

For 1, users typically view logging information as a safe action, so we worry someone accidentialy logging unsantized information and causing unexpected or un-secure behavior. We eventually plan to move off of stdout/stderr style commands in favor of a runner cli.
For 1, users typically view logging information as a safe action, so we worry someone accidentally logging unsanitized information and causing unexpected or insecure behavior. We eventually plan to move off of stdout/stderr style commands in favor of a runner cli.
Investing in this area doesn't make a lot of sense at this time.

While writing to a file to communicate isn't the most ideal pattern, its an existing pattern in the runner and serves us well, so lets reuse it.
Expand Down Expand Up @@ -88,14 +88,14 @@ We will not version these hooks at launch. If needed, we can always major versio
The [job context](https://docs.github.com/en/actions/learn-github-actions/contexts#example-contents-of-the-job-context) currently has a variety of fields that correspond to containers. We should consider allowing hooks to populate new fields in the job context. That is out of scope for this original release however.

## Hooks
Hooks are to be implemented at a very high level, and map to actions the runner does, rather then specific docker actions like `docker build` or `docker create`. By mapping to runner actions, we create a very extensible framework that is flexible enough to solve any user concerns in the future. By providing first party implementations, we give users easy starting points to customize specific hooks (like `docker build`) without having to write full blown solutions.
Hooks are to be implemented at a very high level, and map to actions the runner does, rather than specific docker actions like `docker build` or `docker create`. By mapping to runner actions, we create a very extensible framework that is flexible enough to solve any user concerns in the future. By providing first party implementations, we give users easy starting points to customize specific hooks (like `docker build`) without having to write full blown solutions.

The other would be to provide hooks that mirror every docker call we make, and expose more hooks to help support k8s users, with the expectation that users may have to no-op on multiple hooks if they don't correspond to our use case.

Why we don't want to go that way
- It feels clunky, users need to understand which hooks they need to implement and which they can ignore, which isn't a great UX
- It doesn't scale well, I don't want to build a solution where we may need to add more hooks, by mapping to runner actions, updating hooks is a painful experience for users
- Its overwhelming, its easier to tell users to build 4 hooks and track data themselves, rather then 16 hooks where the runner needs certain information and then needs to provide that information back into each hook. If we expose `Container Create`, you need to return the container you created, then we do `container run` which uses that container. If we just give you an image and say create and run this container, you don't need to store the container id in the runner, and it maps better to k8s scenarios where we don't really have container ids.
- Its overwhelming, its easier to tell users to build 4 hooks and track data themselves, rather than 16 hooks where the runner needs certain information and then needs to provide that information back into each hook. If we expose `Container Create`, you need to return the container you created, then we do `container run` which uses that container. If we just give you an image and say create and run this container, you don't need to store the container id in the runner, and it maps better to k8s scenarios where we don't really have container ids.

### Prepare_job hook
The `prepare_job` hook is called when a job is started. We pass in any job or service containers the job has. We expect that you:
Expand Down Expand Up @@ -286,9 +286,9 @@ jobContainer: **Optional** An Object containing information about the specified

### Cleanup Job
The `cleanup_job` hook is called at the end of a job and expects you to:
- Stop any running service or job containers (or the equiavalent pod)
- Stop any running service or job containers (or the equivalent pod)
- Stop the network (if one exists)
- Delete any job or service containers (or the equiavalent pod)
- Delete any job or service containers (or the equivalent pod)
- Delete the network (if one exists)
- Cleanup anything else that was created for the run

Expand Down
2 changes: 1 addition & 1 deletion docs/adrs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ This folder includes ADRs for the actions runner. ADRs are proposed in the form

---

- More information about ADRs can be found [here](https://github.com/joelparkerhenderson/architecture_decision_record).
- More information about ADRs can be found in [joelparkerhenderson/architecture-decision-record](https://github.com/joelparkerhenderson/architecture_decision_record).
2 changes: 1 addition & 1 deletion docs/checks/actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,4 @@ Make sure the runner has access to actions service for GitHub.com or GitHub Ente

## Still not working?

Contact [GitHub Support](https://support.github.com) if you have further questuons, or log an issue at https://github.com/actions/runner if you think it's a runner issue.
Contact [GitHub Support](https://support.github.com) if you have further questions, or log an issue at https://github.com/actions/runner if you think it's a runner issue.
Loading