Skip to content

Commit 9af6286

Browse files
authored
Merge pull request #44815 from github/repo-sync
Repo sync
2 parents 8d755df + c123582 commit 9af6286

21 files changed

Lines changed: 5431 additions & 22 deletions

File tree

content/actions/how-tos/manage-runners/larger-runners/use-custom-images.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ To create a custom image, you must first set up an image-generation runner. When
4444
* **Platform**: Select a supported platform that matches the platform of the image you plan to create (Linux x64, Linux ARM64, or Windows x64).
4545
* **Image**: Select an image to build on, then enable the checkbox **Enable this runner to generate custom images**.
4646
* You can start from a {% data variables.product.github %}-owned image or choose a base image to start from a clean OS.
47+
* You can start from an existing custom image as the base, enabling layered image workflows.
4748
* For ARM64 platforms, you can also select an ARM-maintained image with preinstalled tooling.
4849
* **Runner group**: Select the group for your runner to be a member of. Once the custom image is created, only runners in this runner group can generate new versions of that image.
4950

@@ -139,6 +140,12 @@ If you specify an older major version in the YAML (for example, version: 1.* whe
139140
> [!NOTE]
140141
> {% data variables.actions.github_hosted_larger_runner %} creation does not support wildcards in image version selection.
141142
143+
## Expiration for images built from custom images
144+
145+
When a custom image is built from another custom image, the derived image inherits the expiration timeline of its base image. The maximum version age is calculated from when the base custom image was built, not when the derived image was created.
146+
147+
For example, if Custom Image A is built on Day 2 and Custom Image B is built from A on Day 4 with a 7-day maximum version age policy, both A and B expire on Day 9.
148+
142149
## Billing and storage for custom images
143150

144151
Jobs that use custom images are billed at the same per-minute rate as the {% data variables.actions.hosted_runner %} that uses the image. Storage for custom images is billed separately through {% data variables.product.prodname_actions %} storage.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
title: About Actions policies
3+
shortTitle: About Actions policies
4+
intro: 'Actions policies let you govern how {% data variables.product.prodname_actions %} workflows run across organizations and repositories in your enterprise, starting with workflow execution protections.'
5+
versions:
6+
ghec: '*'
7+
contentType: concepts
8+
---
9+
10+
{% data reusables.actions.actions-policies-preview-note %}
11+
12+
{% data reusables.actions.actions-policies-about-body %}
13+
14+
## Next steps
15+
16+
To configure workflow execution protections for your enterprise, including setting up event and actor rules, see [AUTOTITLE](/admin/enforcing-policies/enforcing-policies-for-your-enterprise/actions-policies/workflow-execution-protections).
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
title: Actions policies
3+
shortTitle: Actions policies
4+
intro: 'Actions policies let you govern how {% data variables.product.prodname_actions %} workflows run across organizations and repositories in your enterprise.'
5+
versions:
6+
ghec: '*'
7+
children:
8+
- /about-actions-policies
9+
- /workflow-execution-protections
10+
---
11+
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
title: Workflow execution protections
3+
shortTitle: Workflow execution protections
4+
intro: 'Workflow execution protections let you control who can trigger {% data variables.product.prodname_actions %} workflows and which events are permitted to run them across your enterprise.'
5+
versions:
6+
ghec: '*'
7+
contentType: how-tos
8+
---
9+
10+
{% data reusables.actions.workflow-execution-protections-preview-note %}
11+
12+
{% data reusables.actions.workflow-execution-protections-body %}
13+
14+
## Configuring workflow execution protections
15+
16+
You configure workflow execution protections in the new **Policies** section of your {% data variables.product.prodname_actions %} settings. This **Policies** section is separate from your existing **General** settings.
17+
18+
{% data reusables.enterprise-accounts.access-enterprise %}
19+
{% data reusables.enterprise-accounts.policies-tab %}
20+
{% data reusables.enterprise-accounts.actions-tab %}
21+
1. Click **Policies**.
22+
1. Create a ruleset, then add your event and actor rules.
23+
1. Choose whether the ruleset is active or in evaluate mode, then save your changes.

content/admin/enforcing-policies/enforcing-policies-for-your-enterprise/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ children:
1818
- /enforcing-policies-for-github-sponsors-in-your-enterprise
1919
- /enforcing-policies-for-security-settings-in-your-enterprise
2020
- /enforcing-policies-for-github-actions-in-your-enterprise
21+
- /actions-policies
2122
- /enforcing-policies-for-github-copilot-in-your-enterprise
2223
- /enforcing-policies-for-github-codespaces-in-your-enterprise
2324
- /enforcing-policies-for-code-security-and-analysis-for-your-enterprise
@@ -27,3 +28,4 @@ children:
2728
shortTitle: Enforce policies
2829
---
2930

31+

content/copilot/how-tos/copilot-sdk/getting-started.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ Create `index.ts`:
155155
import { CopilotClient } from "@github/copilot-sdk";
156156

157157
const client = new CopilotClient();
158-
const session = await client.createSession({ model: "gpt-4.1" });
158+
const session = await client.createSession({ model: "auto" });
159159

160160
const response = await session.sendAndWait({ prompt: "What is 2 + 2?" });
161161
console.log(response?.data.content);
@@ -184,7 +184,7 @@ async def main():
184184
client = CopilotClient()
185185
await client.start()
186186

187-
session = await client.create_session(on_permission_request=PermissionHandler.approve_all, model="gpt-4.1")
187+
session = await client.create_session(on_permission_request=PermissionHandler.approve_all, model="auto")
188188
response = await session.send_and_wait("What is 2 + 2?")
189189
print(response.data.content)
190190

@@ -224,7 +224,7 @@ func main() {
224224
}
225225
defer client.Stop()
226226

227-
session, err := client.CreateSession(ctx, &copilot.SessionConfig{Model: "gpt-4.1"})
227+
session, err := client.CreateSession(ctx, &copilot.SessionConfig{Model: "auto"})
228228
if err != nil {
229229
log.Fatal(err)
230230
}
@@ -301,7 +301,7 @@ using GitHub.Copilot;
301301
await using var client = new CopilotClient();
302302
await using var session = await client.CreateSessionAsync(new SessionConfig
303303
{
304-
Model = "gpt-4.1",
304+
Model = "auto",
305305
OnPermissionRequest = PermissionHandler.ApproveAll
306306
});
307307

@@ -333,7 +333,7 @@ public class HelloCopilot {
333333

334334
var session = client.createSession(
335335
new SessionConfig()
336-
.setModel("gpt-4.1")
336+
.setModel("auto")
337337
.setOnPermissionRequest(PermissionHandler.APPROVE_ALL)
338338
).get();
339339

@@ -380,7 +380,7 @@ import { CopilotClient } from "@github/copilot-sdk";
380380

381381
const client = new CopilotClient();
382382
const session = await client.createSession({
383-
model: "gpt-4.1",
383+
model: "auto",
384384
streaming: true,
385385
});
386386

@@ -414,7 +414,7 @@ async def main():
414414
client = CopilotClient()
415415
await client.start()
416416

417-
session = await client.create_session(on_permission_request=PermissionHandler.approve_all, model="gpt-4.1", streaming=True)
417+
session = await client.create_session(on_permission_request=PermissionHandler.approve_all, model="auto", streaming=True)
418418

419419
# Listen for response chunks
420420
def handle_event(event):
@@ -459,7 +459,7 @@ func main() {
459459
defer client.Stop()
460460

461461
session, err := client.CreateSession(ctx, &copilot.SessionConfig{
462-
Model: "gpt-4.1",
462+
Model: "auto",
463463
Streaming: copilot.Bool(true),
464464
})
465465
if err != nil {
@@ -551,7 +551,7 @@ using GitHub.Copilot;
551551
await using var client = new CopilotClient();
552552
await using var session = await client.CreateSessionAsync(new SessionConfig
553553
{
554-
Model = "gpt-4.1",
554+
Model = "auto",
555555
OnPermissionRequest = PermissionHandler.ApproveAll,
556556
Streaming = true,
557557
});
@@ -590,7 +590,7 @@ public class HelloCopilot {
590590

591591
var session = client.createSession(
592592
new SessionConfig()
593-
.setModel("gpt-4.1")
593+
.setModel("auto")
594594
.setStreaming(true)
595595
.setOnPermissionRequest(PermissionHandler.APPROVE_ALL)
596596
).get();
@@ -887,7 +887,7 @@ const getWeather = defineTool("get_weather", {
887887

888888
const client = new CopilotClient();
889889
const session = await client.createSession({
890-
model: "gpt-4.1",
890+
model: "auto",
891891
streaming: true,
892892
tools: [getWeather],
893893
});
@@ -941,7 +941,7 @@ async def main():
941941
client = CopilotClient()
942942
await client.start()
943943

944-
session = await client.create_session(on_permission_request=PermissionHandler.approve_all, model="gpt-4.1", streaming=True, tools=[get_weather])
944+
session = await client.create_session(on_permission_request=PermissionHandler.approve_all, model="auto", streaming=True, tools=[get_weather])
945945

946946
def handle_event(event):
947947
if event.type == SessionEventType.ASSISTANT_MESSAGE_DELTA:
@@ -1016,7 +1016,7 @@ func main() {
10161016
defer client.Stop()
10171017

10181018
session, err := client.CreateSession(ctx, &copilot.SessionConfig{
1019-
Model: "gpt-4.1",
1019+
Model: "auto",
10201020
Streaming: copilot.Bool(true),
10211021
Tools: []copilot.Tool{getWeather},
10221022
})
@@ -1152,7 +1152,7 @@ var getWeather = CopilotTool.DefineTool(
11521152

11531153
await using var session = await client.CreateSessionAsync(new SessionConfig
11541154
{
1155-
Model = "gpt-4.1",
1155+
Model = "auto",
11561156
OnPermissionRequest = PermissionHandler.ApproveAll,
11571157
Streaming = true,
11581158
Tools = [getWeather],
@@ -1225,7 +1225,7 @@ public class HelloCopilot {
12251225

12261226
var session = client.createSession(
12271227
new SessionConfig()
1228-
.setModel("gpt-4.1")
1228+
.setModel("auto")
12291229
.setStreaming(true)
12301230
.setTools(List.of(getWeather))
12311231
.setOnPermissionRequest(PermissionHandler.APPROVE_ALL)
@@ -1283,7 +1283,7 @@ const getWeather = defineTool("get_weather", {
12831283

12841284
const client = new CopilotClient();
12851285
const session = await client.createSession({
1286-
model: "gpt-4.1",
1286+
model: "auto",
12871287
streaming: true,
12881288
tools: [getWeather],
12891289
});
@@ -1354,7 +1354,7 @@ async def main():
13541354
client = CopilotClient()
13551355
await client.start()
13561356

1357-
session = await client.create_session(on_permission_request=PermissionHandler.approve_all, model="gpt-4.1", streaming=True, tools=[get_weather])
1357+
session = await client.create_session(on_permission_request=PermissionHandler.approve_all, model="auto", streaming=True, tools=[get_weather])
13581358

13591359
def handle_event(event):
13601360
if event.type == SessionEventType.ASSISTANT_MESSAGE_DELTA:
@@ -1445,7 +1445,7 @@ func main() {
14451445
defer client.Stop()
14461446

14471447
session, err := client.CreateSession(ctx, &copilot.SessionConfig{
1448-
Model: "gpt-4.1",
1448+
Model: "auto",
14491449
Streaming: copilot.Bool(true),
14501450
Tools: []copilot.Tool{getWeather},
14511451
})
@@ -1630,7 +1630,7 @@ var getWeather = CopilotTool.DefineTool(
16301630
await using var client = new CopilotClient();
16311631
await using var session = await client.CreateSessionAsync(new SessionConfig
16321632
{
1633-
Model = "gpt-4.1",
1633+
Model = "auto",
16341634
OnPermissionRequest = PermissionHandler.ApproveAll,
16351635
Streaming = true,
16361636
Tools = [getWeather]
@@ -1723,7 +1723,7 @@ public class WeatherAssistant {
17231723

17241724
var session = client.createSession(
17251725
new SessionConfig()
1726-
.setModel("gpt-4.1")
1726+
.setModel("auto")
17271727
.setStreaming(true)
17281728
.setOnPermissionRequest(request ->
17291729
CompletableFuture.completedFuture(PermissionDecision.allow())
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
title: About Actions policies
3+
shortTitle: About Actions policies
4+
intro: 'Actions policies let you govern how {% data variables.product.prodname_actions %} workflows run across repositories in your organization, starting with workflow execution protections.'
5+
versions:
6+
fpt: '*'
7+
ghec: '*'
8+
contentType: concepts
9+
---
10+
11+
{% data reusables.actions.actions-policies-preview-note %}
12+
13+
{% data reusables.actions.actions-policies-about-body %}
14+
15+
## Next steps
16+
17+
To configure workflow execution protections for your organization, including setting up event and actor rules, see [AUTOTITLE](/organizations/managing-organization-settings/actions-policies/workflow-execution-protections).
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
title: Actions policies
3+
shortTitle: Actions policies
4+
intro: 'Actions policies let you govern how {% data variables.product.prodname_actions %} workflows run across repositories in your organization.'
5+
versions:
6+
fpt: '*'
7+
ghec: '*'
8+
children:
9+
- /about-actions-policies
10+
- /workflow-execution-protections
11+
---
12+
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
title: Workflow execution protections
3+
shortTitle: Workflow execution protections
4+
intro: 'Workflow execution protections let you control who can trigger {% data variables.product.prodname_actions %} workflows and which events are permitted to run them across your organization.'
5+
versions:
6+
fpt: '*'
7+
ghec: '*'
8+
contentType: how-tos
9+
---
10+
11+
{% data reusables.actions.workflow-execution-protections-preview-note %}
12+
13+
{% data reusables.actions.workflow-execution-protections-body %}
14+
15+
## Configuring workflow execution protections
16+
17+
You configure workflow execution protections in the new **Policies** section of your {% data variables.product.prodname_actions %} settings. This **Policies** section is separate from your existing **General** settings.
18+
19+
{% data reusables.profile.access_org %}
20+
{% data reusables.profile.org_settings %}
21+
1. In the left sidebar, under **Actions**, click **Policies**.
22+
1. Create a ruleset, then add your event and actor rules.
23+
1. Choose whether the ruleset is active or in evaluate mode, then save your changes.

content/organizations/managing-organization-settings/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ children:
2020
- /managing-the-forking-policy-for-your-organization
2121
- /managing-pull-request-reviews-in-your-organization
2222
- /disabling-or-limiting-github-actions-for-your-organization
23+
- /actions-policies
2324
- /about-networking-for-hosted-compute-products-in-your-organization
2425
- /about-azure-private-networking-for-github-hosted-runners-in-your-organization
2526
- /configuring-private-networking-for-github-hosted-runners-in-your-organization
@@ -55,3 +56,4 @@ children:
5556
- /managing-or-restricting-github-models-for-your-organization
5657
shortTitle: Manage organization settings
5758
---
59+

0 commit comments

Comments
 (0)