Skip to content

Commit 57c4680

Browse files
author
Martin Lopes
authored
Merge branch 'main' into pwsh-commands
2 parents 63978b6 + 0d7d093 commit 57c4680

File tree

595 files changed

+9107
-6035
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

595 files changed

+9107
-6035
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"davidanson.vscode-markdownlint",
2323
"bierner.markdown-preview-github-styles",
2424
"streetsidesoftware.code-spell-checker",
25-
"docs.open-reusables"
25+
"alistairchristie.open-reusables"
2626
],
2727

2828
// Use 'forwardPorts' to make a list of ports inside the container available locally.

.github/actions-scripts/projects.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ export function generateUpdateProjectNextItemFieldMutation({
190190
// Strip all non-alphanumeric out of the item ID when creating the mutation ID to avoid a GraphQL parsing error
191191
// (statistically, this should still give us a unique mutation ID)
192192
return `
193-
set_${fieldID.substr(1)}_item_${item.replaceAll(
193+
set_${fieldID.slice(1)}_item_${item.replaceAll(
194194
/[^a-z0-9]/g,
195195
''
196196
)}: updateProjectNextItemField(input: {

.github/workflows/browser-test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,8 @@ jobs:
5959
path: .next/cache
6060
key: ${{ runner.os }}-nextjs-${{ hashFiles('package*.json') }}
6161

62+
- name: Run build script
63+
run: npm run build
64+
6265
- name: Run browser-test
6366
run: npm run browser-test

.github/workflows/test.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,6 @@ jobs:
135135
- name: Run build script
136136
run: npm run build
137137

138-
- name: Warm possible disk caching
139-
env:
140-
NODE_ENV: test
141-
run: ./script/warm-before-tests.mjs
142-
143138
- name: Run tests
144139
env:
145140
DIFF_FILE: get_diff_files.txt

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ COPY --chown=node:node feature-flags.json ./
8989
COPY --chown=node:node data ./data
9090
COPY --chown=node:node next.config.js ./
9191
COPY --chown=node:node server.mjs ./server.mjs
92+
COPY --chown=node:node start-server.mjs ./start-server.mjs
9293

9394
EXPOSE $PORT
9495

content/actions/hosting-your-own-runners/about-self-hosted-runners.md

Lines changed: 33 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -133,15 +133,29 @@ Some extra configuration might be required to use actions from {% data variables
133133

134134
## Communication between self-hosted runners and {% data variables.product.product_name %}
135135

136-
The self-hosted runner polls {% data variables.product.product_name %} to retrieve application updates and to check if any jobs are queued for processing. The self-hosted runner uses a HTTPS _long poll_ that opens a connection to {% data variables.product.product_name %} for 50 seconds, and if no response is received, it then times out and creates a new long poll. The application must be running on the machine to accept and run {% data variables.product.prodname_actions %} jobs.
136+
The self-hosted runner connects to {% data variables.product.product_name %} to receive job assignments and to download new versions of the runner application. The self-hosted runner uses an {% ifversion ghes %}HTTP(S){% else %}HTTPS{% endif %} _long poll_ that opens a connection to {% data variables.product.product_name %} for 50 seconds, and if no response is received, it then times out and creates a new long poll. The application must be running on the machine to accept and run {% data variables.product.prodname_actions %} jobs.
137137

138138
{% data reusables.actions.self-hosted-runner-ports-protocols %}
139139

140-
{% data reusables.actions.self-hosted-runner-communications-for-ghae %}
141-
142140
{% ifversion fpt or ghec %}
141+
Since the self-hosted runner opens a connection to {% data variables.product.product_location %}, you do not need to allow {% data variables.product.prodname_dotcom %} to make inbound connections to your self-hosted runner.
142+
{% elsif ghes or ghae %}
143+
Only an outbound connection from the runner to {% data variables.product.product_location %} is required. There is no need for an inbound connection from {% data variables.product.product_location %} to the runner.
144+
{%- endif %}
145+
146+
{% ifversion ghes %}
147+
148+
{% data variables.product.product_name %} must accept inbound connections from your runners over {% ifversion ghes %}HTTP(S){% else %}HTTPS{% endif %} at {% data variables.product.product_location %}'s hostname and API subdomain, and your runners must allow outbound connections over {% ifversion ghes %}HTTP(S){% else %}HTTPS{% endif %} to {% data variables.product.product_location %}'s hostname and API subdomain.
143149

144-
Since the self-hosted runner opens a connection to {% data variables.product.prodname_dotcom %}, you do not need to allow {% data variables.product.prodname_dotcom %} to make inbound connections to your self-hosted runner.
150+
{% elsif ghae %}
151+
152+
You must ensure that the self-hosted runner has appropriate network access to communicate with your {% data variables.product.product_name %} URL and its subdomains. For example, if your subdomain for {% data variables.product.product_name %} is `octoghae`, then you will need to allow the self-hosted runner to access `octoghae.githubenterprise.com`, `api.octoghae.githubenterprise.com`, and `codeload.octoghae.githubenterprise.com`.
153+
154+
If you use an IP address allow list, you must add your self-hosted runner's IP address to the allow list. For more information, see "[Managing allowed IP addresses for your organization](/organizations/keeping-your-organization-secure/managing-allowed-ip-addresses-for-your-organization#using-github-actions-with-an-ip-allow-list)."
155+
156+
{% endif %}
157+
158+
{% ifversion fpt or ghec %}
145159

146160
You must ensure that the machine has the appropriate network access to communicate with the {% data variables.product.prodname_dotcom %} hosts listed below. Some hosts are required for essential runner operations, while other hosts are only required for certain functionality.
147161

@@ -191,34 +205,39 @@ If you use an IP address allow list for your {% data variables.product.prodname_
191205

192206
{% else %}
193207

194-
You must ensure that the machine has the appropriate network access to communicate with {% data variables.product.product_location %}.{% ifversion ghes %} Self-hosted runners connect directly to {% data variables.product.product_location %} and do not require any external internet access in order to function. As a result, you can use network routing to direct communication between the self-hosted runner and {% data variables.product.product_location %}. For example, you can assign a private IP address to your self-hosted runner and configure routing to send traffic to {% data variables.product.product_location %}, with no need for traffic to traverse a public network.{% endif %}
208+
{% ifversion ghes %}Self-hosted runners do not require any external internet access in order to function. As a result, you can use network routing to direct communication between the self-hosted runner and {% data variables.product.product_location %}. For example, you can assign a private IP address to your self-hosted runner and configure routing to send traffic to {% data variables.product.product_location %}, with no need for traffic to traverse a public network.{% endif %}
195209

196210
{% endif %}
197211

212+
{% ifversion ghae %}
213+
If you use an IP address allow list for your {% data variables.product.prodname_dotcom %} organization or enterprise account, you must add your self-hosted runner's IP address to the allow list. For more information, see "[Managing allowed IP addresses for your organization](/organizations/keeping-your-organization-secure/managing-allowed-ip-addresses-for-your-organization#using-github-actions-with-an-ip-allow-list)."
214+
{% endif %}
215+
198216
You can also use self-hosted runners with a proxy server. For more information, see "[Using a proxy server with self-hosted runners](/actions/automating-your-workflow-with-github-actions/using-a-proxy-server-with-self-hosted-runners)."
199217

200218
For more information about troubleshooting common network connectivity issues, see "[Monitoring and troubleshooting self-hosted runners](/actions/hosting-your-own-runners/monitoring-and-troubleshooting-self-hosted-runners#troubleshooting-network-connectivity)."
201219

202-
{% ifversion ghes %}
220+
{% ifversion ghes or ghae %}
203221

204222
## Communication between self-hosted runners and {% data variables.product.prodname_dotcom_the_website %}
205223

206-
Self-hosted runners do not need to connect to {% data variables.product.prodname_dotcom_the_website %} unless you have [enabled automatic access to {% data variables.product.prodname_dotcom_the_website %} actions using {% data variables.product.prodname_github_connect %}](/admin/github-actions/managing-access-to-actions-from-githubcom/enabling-automatic-access-to-githubcom-actions-using-github-connect).
224+
Self-hosted runners do not need to connect to {% data variables.product.prodname_dotcom_the_website %} unless you have enabled automatic access to {% data variables.product.prodname_dotcom_the_website %} actions for {% data variables.product.product_location %}. For more information, see "[About using actions in your enterprise](/admin/github-actions/managing-access-to-actions-from-githubcom/about-using-actions-in-your-enterprise)."
207225

208-
If you have enabled automatic access to {% data variables.product.prodname_dotcom_the_website %} actions using {% data variables.product.prodname_github_connect %}, then the self-hosted runner will connect directly to {% data variables.product.prodname_dotcom_the_website %} to download actions. You must ensure that the machine has the appropriate network access to communicate with the {% data variables.product.prodname_dotcom %} URLs listed below.
209-
210-
{% note %}
211-
212-
**Note:** Some of the domains listed below are configured using `CNAME` records. Some firewalls might require you to add rules recursively for all `CNAME` records. Note that the `CNAME` records might change in the future, and that only the domains listed below will remain constant.
213-
214-
{% endnote %}
226+
If you have enabled automatic access to {% data variables.product.prodname_dotcom_the_website %} actions, then the self-hosted runner will connect directly to {% data variables.product.prodname_dotcom_the_website %} to download actions. You must ensure that the machine has the appropriate network access to communicate with the {% data variables.product.prodname_dotcom %} URLs listed below.
215227

216228
```
217229
github.com
218230
api.github.com
219231
codeload.github.com
220232
```
221233

234+
{% note %}
235+
236+
**Note:** Some of the domains listed above are configured using `CNAME` records. Some firewalls might require you to add rules recursively for all `CNAME` records. Note that the `CNAME` records might change in the future, and that only the domains listed above will remain constant.
237+
238+
{% endnote %}
239+
240+
222241
{% endif %}
223242

224243
## Self-hosted runner security

content/actions/security-guides/encrypted-secrets.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,10 @@ steps:
227227
```
228228
{% endraw %}
229229
230+
Secrets cannot be directly referenced in `if:` conditionals. Instead, consider setting secrets as job-level environment variables, then referencing the environment variables to conditionally run steps in the job. For more information, see "[Context availability](/actions/learn-github-actions/contexts#context-availability)" and [`jobs.<job_id>.steps[*].if`](/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsif).
231+
232+
If a secret has not been set, the return value of an expression referencing the secret (such as {% raw %}`${{ secrets.SuperSecret }}`{% endraw %} in the example) will be an empty string.
233+
230234
Avoid passing secrets between processes from the command line, whenever possible. Command-line processes may be visible to other users (using the `ps` command) or captured by [security audit events](https://docs.microsoft.com/windows-server/identity/ad-ds/manage/component-updates/command-line-process-auditing). To help protect secrets, consider using environment variables, `STDIN`, or other mechanisms supported by the target process.
231235
232236
If you must pass secrets within a command line, then enclose them within the proper quoting rules. Secrets often contain special characters that may unintentionally affect your shell. To escape these special characters, use quoting with your environment variables. For example:

content/actions/using-workflows/workflow-syntax-for-github-actions.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,31 @@ steps:
342342
uses: actions/[email protected]
343343
```
344344

345+
#### Example: Using secrets
346+
347+
Secrets cannot be directly referenced in `if:` conditionals. Instead, consider setting secrets as job-level environment variables, then referencing the environment variables to conditionally run steps in the job.
348+
349+
If a secret has not been set, the return value of an expression referencing the secret (such as {% raw %}`${{ secrets.SuperSecret }}`{% endraw %} in the example) will be an empty string.
350+
351+
{% raw %}
352+
```yaml
353+
name: Run a step if a secret has been set
354+
on: push
355+
jobs:
356+
my-jobname:
357+
runs-on: ubuntu-latest
358+
env:
359+
super_secret: ${{ secrets.SuperSecret }}
360+
steps:
361+
- if: ${{ env.super_secret != '' }}
362+
run: echo 'This step will only run if the secret has a value set.'
363+
- if: ${{ env.super_secret == '' }}
364+
run: echo 'This step will only run if the secret does not have a value set.'
365+
```
366+
{% endraw %}
367+
368+
For more information, see "[Context availability](/actions/learn-github-actions/contexts#context-availability)" and "[Encrypted secrets](/actions/security-guides/encrypted-secrets)."
369+
345370
### `jobs.<job_id>.steps[*].name`
346371

347372
A name for your step to display on {% data variables.product.prodname_dotcom %}.

content/admin/configuration/configuring-network-settings/network-ports.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Some administrative ports are required to configure {% data variables.product.pr
2525
| Port | Service | Description |
2626
|---|---|---|
2727
| 8443 | HTTPS | Secure web-based {% data variables.enterprise.management_console %}. Required for basic installation and configuration. |
28-
| 8080 | HTTP | Plain-text web-based {% data variables.enterprise.management_console %}. Not required unless SSL is disabled manually. |
28+
| 8080 | HTTP | Plain-text web-based {% data variables.enterprise.management_console %}. Not required unless TLS is disabled manually. |
2929
| 122 | SSH | Shell access for {% data variables.product.product_location %}. Required to be open to incoming connections between all nodes in a high availability configuration. The default SSH port (22) is dedicated to Git and SSH application network traffic. |
3030
| 1194/UDP | VPN | Secure replication network tunnel in high availability configuration. Required to be open for communication between all nodes in the configuration.|
3131
| 123/UDP| NTP | Required for time protocol operation. |
@@ -38,7 +38,7 @@ Application ports provide web application and Git access for end users.
3838
| Port | Service | Description |
3939
|---|---|---|
4040
| 443 | HTTPS | Access to the web application and Git over HTTPS. |
41-
| 80 | HTTP | Access to the web application. All requests are redirected to the HTTPS port when SSL is enabled. |
41+
| 80 | HTTP | Access to the web application. All requests are redirected to the HTTPS port if TLS is configured. |
4242
| 22 | SSH | Access to Git over SSH. Supports clone, fetch, and push operations to public and private repositories. |
4343
| 9418 | Git | Git protocol port supports clone and fetch operations to public repositories with unencrypted network communication. {% data reusables.enterprise_installation.when-9418-necessary %} |
4444

@@ -51,3 +51,18 @@ Email ports must be accessible directly or via relay for inbound email support f
5151
| Port | Service | Description |
5252
|---|---|---|
5353
| 25 | SMTP | Support for SMTP with encryption (STARTTLS). |
54+
55+
## {% data variables.product.prodname_actions %} ports
56+
57+
{% data variables.product.prodname_actions %} ports must be accessible for self-hosted runners to connect to {% data variables.product.product_location %}. For more information, see "[About self-hosted runners](/actions/hosting-your-own-runners/about-self-hosted-runners#communication-between-self-hosted-runners-and-github-enterprise-server)."
58+
59+
| Port | Service | Description |
60+
|---|---|---|
61+
| 443 | HTTPS | Self-hosted runners connect to {% data variables.product.product_location %} to receive job assignments and to download new versions of the runner application. Required if TLS is configured.
62+
| 80 | HTTP | Self-hosted runners connect to {% data variables.product.product_location %} to receive job assignments and to download new versions of the runner application. Required if TLS is not configured.
63+
64+
If you enable automatic access to {% data variables.product.prodname_dotcom_the_website %} actions, {% data variables.product.prodname_actions %} will always search for an action on {% data variables.product.product_location %} first, via these ports, before checking {% data variables.product.prodname_dotcom_the_website %}. For more information, see "[Enabling automatic access to {% data variables.product.prodname_dotcom_the_website %} actions using {% data variables.product.prodname_github_connect %}](/admin/github-actions/managing-access-to-actions-from-githubcom/enabling-automatic-access-to-githubcom-actions-using-github-connect#about-resolution-for-actions-using-github-connect)."
65+
66+
## Further reading
67+
68+
- "[Configuring TLS](/admin/configuration/configuring-network-settings/configuring-tls)"

content/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/about-github-actions-for-enterprises.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ topics:
3333

3434
{% data variables.product.prodname_actions %} helps your team work faster at scale. When large repositories start using {% data variables.product.prodname_actions %}, teams merge significantly more pull requests per day, and the pull requests are merged significantly faster. For more information, see "[Writing and shipping code faster](https://octoverse.github.com/writing-code-faster/#scale-through-automation)" in the State of the Octoverse.
3535

36-
You can create your own unique automations, or you can use and adapt workflows from our ecosystem of over 10,000 actions built by industry leaders and the open source community. For more information, see "[Finding and customizing actions](/actions/learn-github-actions/finding-and-customizing-actions)."
36+
You can create your own unique automations, or you can use and adapt workflows from our ecosystem of over 10,000 actions built by industry leaders and the open source community. {% ifversion ghec %}For more information, see "[Finding and customizing actions](/actions/learn-github-actions/finding-and-customizing-actions)."{% else %}You can restrict your developers to using actions that exist on {% data variables.product.product_location %}, or you can allow your developers to access actions on {% data variables.product.prodname_dotcom_the_website %}. For more information, see "[About using actions in your enterprise](/admin/github-actions/managing-access-to-actions-from-githubcom/about-using-actions-in-your-enterprise)."{% endif %}
3737

3838
{% data variables.product.prodname_actions %} is developer friendly, because it's integrated directly into the familiar {% data variables.product.product_name %} experience.
3939

0 commit comments

Comments
 (0)