feat: new /enterprises/{enterprise}/actions/hosted-runners, `/orgs/… · octokit/plugin-rest-endpoint-methods.js@b3fe977 (original) (raw)

``

1

`+


`

``

2

`+

name: Create a GitHub-hosted runner for an organization

`

``

3

`+

example: octokit.rest.actions.createHostedRunnerForOrg({ org, name, image, size, runner_group_id })

`

``

4

`+

route: POST /orgs/{org}/actions/hosted-runners

`

``

5

`+

scope: actions

`

``

6

`+

type: API method

`

``

7

`+


`

``

8

+

``

9

`+

Create a GitHub-hosted runner for an organization

`

``

10

+

``

11

`+

Creates a GitHub-hosted runner for an organization.

`

``

12

`` +

OAuth tokens and personal access tokens (classic) need the manage_runners:org scope to use this endpoint.

``

``

13

+

``

14


```js

``

15

`+

octokit.rest.actions.createHostedRunnerForOrg({

`

``

16

`+

org,

`

``

17

`+

name,

`

``

18

`+

image,

`

``

19

`+

size,

`

``

20

`+

runner_group_id,

`

``

21

`+

});

`

``

22


```

``

23

+

``

24

`+

Parameters

`

``

25

+

``

26

`+

`

``

27

`+

`

``

28

`+

`

``

29

`+

`

``

30

`+

`

``

31

`+

`

``

32

`+

`

``

33

`+

`

``

34

`+

`

``

35

`+

`

``

40

`+

`

``

45

`+

`

``

50

`+

`

``

55

`+

`

``

60

`+

`

``

65

`+

`

``

70

`+

`

``

75

`+

`

``

80

`+

`

``

81

`+

name required description
orgyes

`

``

36

+

``

37

`+

The organization name. The name is not case sensitive.

`

``

38

+

``

39

`+

nameyes

`

``

41

+

``

42

`+

Name of the runner. Must be between 1 and 64 characters and may only contain upper and lowercase letters a-z, numbers 0-9, '.', '-', and '_'.

`

``

43

+

``

44

`+

imageyes

`

``

46

+

``

47

`` +

The image of runner. To list all available images, use GET /actions/hosted-runners/images/github-owned or GET /actions/hosted-runners/images/partner.

``

``

48

+

``

49

`+

image.idno

`

``

51

+

``

52

`+

The unique identifier of the runner image.

`

``

53

+

``

54

`+

image.sourceno

`

``

56

+

``

57

`+

The source of the runner image.

`

``

58

+

``

59

`+

sizeyes

`

``

61

+

``

62

`` +

The machine size of the runner. To list available sizes, use GET actions/hosted-runners/machine-sizes

``

``

63

+

``

64

`+

runner_group_idyes

`

``

66

+

``

67

`+

The existing runner group to add this runner to.

`

``

68

+

``

69

`+

maximum_runnersno

`

``

71

+

``

72

`+

The maximum amount of runners to scale up to. Runners will not auto-scale above this number. Use this setting to limit your cost.

`

``

73

+

``

74

`+

enable_static_ipno

`

``

76

+

``

77

`` +

Whether this runner should be created with a static public IP. Note limit on account. To list limits on account, use GET actions/hosted-runners/limits

``

``

78

+

``

79

`+

`

``

82

+

``

83

`+

See also: GitHub Developer Guide documentation.

`