Skip to content

Commit eadc5aa

Browse files
committed
Merge branch 'main' of github.com:github/docs-internal into refactor-site-tree
2 parents 04460a0 + 8940baf commit eadc5aa

1,162 files changed

Lines changed: 18267 additions & 2642 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
53.8 KB
Loading
46.4 KB
Loading
18.8 KB
Loading

content/admin/github-actions/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ topics:
3232
{% link_in_list /about-using-actions-on-github-enterprise-server %}
3333
{% link_in_list /enabling-automatic-access-to-githubcom-actions-using-github-connect %}
3434
{% link_in_list /manually-syncing-actions-from-githubcom %}
35+
{% link_in_list /using-the-latest-version-of-the-official-bundled-actions %}
3536
{% link_in_list /setting-up-the-tool-cache-on-self-hosted-runners-without-internet-access %}
3637

3738
{% topic_link_in_list /advanced-configuration-and-troubleshooting %}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
title: Using the latest version of the official bundled actions
3+
intro: 'You can update the actions that are bundled with your {% data variables.product.prodname_ghe_server %} instance, or use actions directly from {% data variables.product.prodname_dotcom_the_website %}.'
4+
versions:
5+
enterprise-server: '>=2.22'
6+
topics:
7+
- enterprise
8+
---
9+
10+
{% data reusables.actions.enterprise-beta %}
11+
{% data reusables.actions.enterprise-github-hosted-runners %}
12+
13+
Your {% data variables.product.prodname_ghe_server %} instance includes a number of built-in actions that you can use in your workflows. For more information about the bundled actions, see ["Official actions bundled with {% data variables.product.prodname_ghe_server %}"](/admin/github-actions/about-using-actions-on-github-enterprise-server#official-actions-bundled-with-github-enterprise-server).
14+
15+
These bundled actions are a point-in-time snapshot of the official actions found at https://github.com/actions; as a result, these actions may be older versions that can be updated. To update these actions, you can use `actions-sync` to retrieve updated versions from {% data variables.product.prodname_dotcom_the_website %}.
16+
17+
Alternatively, if your {% data variables.product.prodname_ghe_server %} instance has {% data variables.product.prodname_github_connect %} enabled, then you have additional options for using the latest actions from {% data variables.product.prodname_dotcom_the_website %}:
18+
19+
- Your workflow file can directly reference a specific tag that only exists on {% data variables.product.prodname_dotcom_the_website %}.
20+
- To force the workflow file to use the actions on {% data variables.product.prodname_dotcom_the_website %}, you can edit the tag assigned to the bundled actions.
21+
22+
These options are described in more detail in the following sections.
23+
24+
### Using actions-sync to update a bundled action
25+
26+
To update the bundled actions, you can use the `actions-sync` tool to synchronize actions with {% data variables.product.prodname_dotcom_the_website %}. For more information on using `actions-sync`, see "[Manually syncing actions from {% data variables.product.prodname_dotcom_the_website %}](/admin/github-actions/manually-syncing-actions-from-githubcom)."
27+
28+
### Using actions from {% data variables.product.prodname_dotcom_the_website %}
29+
30+
{% data reusables.github-actions.actions-github-connect-requirement %}
31+
32+
Once configured, you can use a new version of an action from {% data variables.product.prodname_dotcom_the_website %} by manually specifying the required version in the workflow file. For example, to use version `v2.2.1` of `actions/setup-python` from {% data variables.product.prodname_dotcom_the_website %}, you can specify the tag `actions/setup-python@v2.2.1` in your workflow file.
33+
34+
### Using the latest version by removing the specific action's tag
35+
36+
{% data reusables.github-actions.actions-github-connect-requirement %}
37+
38+
If you remove the version tag that was previously assigned to an action, {% data variables.product.prodname_ghe_server %} will check {% data variables.product.prodname_dotcom_the_website %} for the required tag. For more information on working with tags, see "[Viewing tags](/github/administering-a-repository/viewing-your-repositorys-releases-and-tags#viewing-tags)."
39+
40+
For example, to use version `v2.2.1` of `actions/setup-python` from {% data variables.product.prodname_dotcom_the_website %}:
41+
42+
1. In {% data variables.product.prodname_ghe_server %}, delete the `v2` tag from the `actions/setup-python` repository.
43+
1. Create a workflow that uses `actions/setup-python` with the `v2` tag.
44+
45+
When the workflow is unable to find the specified `v2` tag on {% data variables.product.prodname_ghe_server %}, it checks {% data variables.product.prodname_dotcom_the_website %} for the required tag. If it finds a tagged version of that action, {% data variables.product.prodname_ghe_server %} uses the version from {% data variables.product.prodname_dotcom_the_website %}.

content/developers/apps/authorizing-oauth-apps.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,19 +86,19 @@ Name | Type | Description
8686

8787
By default, the response takes the following form:
8888

89-
access_token=e72e16c7e42f292c6912e7710c838347ae178b4a&token_type=bearer
89+
access_token={% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@3.1" or currentVersion == "github-ae@next" %}gho_16C7e42F292c6912E7710c838347Ae178B4a{% else %}e72e16c7e42f292c6912e7710c838347ae178b4a{% endif %}&token_type=bearer
9090

9191
You can also receive the content in different formats depending on the Accept
9292
header:
9393

9494
Accept: application/json
95-
{"access_token":"e72e16c7e42f292c6912e7710c838347ae178b4a", "scope":"repo,gist", "token_type":"bearer"}
95+
{"access_token":"{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@3.1" or currentVersion == "github-ae@next" %}gho_16C7e42F292c6912E7710c838347Ae178B4a{% else %}e72e16c7e42f292c6912e7710c838347ae178b4a{% endif %}", "scope":"repo,gist", "token_type":"bearer"}
9696

9797
Accept: application/xml
9898
<OAuth>
9999
<token_type>bearer</token_type>
100100
<scope>repo,gist</scope>
101-
<access_token>e72e16c7e42f292c6912e7710c838347ae178b4a</access_token>
101+
<access_token>{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@3.1" or currentVersion == "github-ae@next" %}gho_16C7e42F292c6912E7710c838347Ae178B4a{% else %}e72e16c7e42f292c6912e7710c838347ae178b4a{% endif %}</access_token>
102102
</OAuth>
103103

104104
#### 3. Use the access token to access the API
@@ -208,7 +208,7 @@ Name | Type | Description
208208

209209
```json
210210
{
211-
"access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a",
211+
"access_token": "{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@3.1" or currentVersion == "github-ae@next" %}gho_16C7e42F292c6912E7710c838347Ae178B4a{% else %}e72e16c7e42f292c6912e7710c838347ae178b4a{% endif %}",
212212
"token_type": "bearer",
213213
"scope": "user"
214214
}
@@ -311,3 +311,7 @@ To build this link, you'll need your OAuth Apps `client_id` that you received fr
311311
{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.21" or currentVersion == "github-ae@latest" %}
312312
* "[Device flow errors](#errors-for-the-device-flow)"
313313
{% endif %}
314+
315+
### Further reading
316+
317+
- "[About authentication to {% data variables.product.prodname_dotcom %}](/github/authenticating-to-github/about-authentication-to-github)"

content/developers/apps/creating-a-github-app-from-a-manifest.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ The person creating the app will be redirected to a GitHub page with an input fi
5959
`name` | `string` | The name of the GitHub App.
6060
`url` | `string` | **Required.** The homepage of your GitHub App.
6161
`hook_attributes` | `object` | The configuration of the GitHub App's webhook.
62-
`redirect_url` | `string` | The full URL to redirect to after the person installs the GitHub App.
62+
`redirect_url` | `string` | The full URL to redirect to after a user initiates the creation of a GitHub App from a manifest.{% if currentVersion == "free-pro-team@latest" or currentVersion == "github-ae@next" or currentVersion ver_gt "enterprise-server@3.0" %}
63+
`callback_urls` | `array of strings` | A full URL to redirect to after someone authorizes an installation. You can provide up to 10 callback URLs.{% else %}
64+
`callback_url` | `string` | A full URL to redirect to after someone authorizes an installation.{% endif %}
6365
`description` | `string` | A description of the GitHub App.
6466
`public` | `boolean` | Set to `true` when your GitHub App is available to the public or `false` when it is only accessible to the owner of the app.
6567
`default_events` | `array` | The list of [events](/webhooks/event-payloads) the GitHub App subscribes to.
@@ -96,7 +98,10 @@ This example uses a form on a web page with a button that triggers the `POST` re
9698
"hook_attributes": {
9799
"url": "https://example.com/github/events",
98100
},
99-
"redirect_url": "https://example.com/callback",
101+
"redirect_url": "https://example.com/redirect",
102+
{% if currentVersion == "free-pro-team@latest" or currentVersion == "github-ae@next" or currentVersion ver_gt "enterprise-server@3.0" %}"callback_urls": [
103+
"https://example.com/callback"
104+
],{% else %}"callback_url": "https://example.com/callback",{% endif %}
100105
"public": true,
101106
"default_permissions": {
102107
"issues": "write",
@@ -111,10 +116,11 @@ This example uses a form on a web page with a button that triggers the `POST` re
111116
})
112117
</script>
113118
```
119+
114120
This example uses a form on a web page with a button that triggers the `POST` request for an organization account. Replace `ORGANIZATION` with the name of the organization account where you want to create the app.
115121

116122
```html
117-
<form action="https://github.com/organizations/<em>ORGANIZATION</em>/settings/apps/new?state=abc123" method="post">
123+
<form action="https://github.com/organizations/ORGANIZATION/settings/apps/new?state=abc123" method="post">
118124
Create a GitHub App Manifest: <input type="text" name="manifest" id="manifest"><br>
119125
<input type="submit" value="Submit">
120126
</form>
@@ -127,7 +133,10 @@ This example uses a form on a web page with a button that triggers the `POST` re
127133
"hook_attributes": {
128134
"url": "https://example.com/github/events",
129135
},
130-
"redirect_url": "https://example.com/callback",
136+
"redirect_url": "https://example.com/redirect",
137+
{% if currentVersion == "free-pro-team@latest" or currentVersion == "github-ae@next" or currentVersion ver_gt "enterprise-server@3.0" %}"callback_urls": [
138+
"https://example.com/callback"
139+
],{% else %}"callback_url": "https://example.com/callback",{% endif %}
131140
"public": true,
132141
"default_permissions": {
133142
"issues": "write",
@@ -147,11 +156,11 @@ This example uses a form on a web page with a button that triggers the `POST` re
147156

148157
When the person clicks **Create GitHub App**, GitHub redirects back to the `redirect_url` with a temporary `code` in a code parameter. For example:
149158

150-
https://example.com/callback?code=a180b1a3d263c81bc6441d7b990bae27d4c10679
159+
https://example.com/redirect?code=a180b1a3d263c81bc6441d7b990bae27d4c10679
151160

152161
If you provided a `state` parameter, you will also see that parameter in the `redirect_url`. For example:
153162

154-
https://example.com/callback?code=a180b1a3d263c81bc6441d7b990bae27d4c10679&state=abc123
163+
https://example.com/redirect?code=a180b1a3d263c81bc6441d7b990bae27d4c10679&state=abc123
155164

156165
#### 3. You exchange the temporary code to retrieve the app configuration
157166

content/developers/apps/creating-a-github-app-using-url-parameters.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,15 @@ The person creating the app can edit the preselected values from the {% data var
2222

2323
The following URL creates a new public app called `octocat-github-app` with a preconfigured description and callback URL. This URL also selects read and write permissions for `checks`, subscribes to the `check_run` and `check_suite` webhook events, and selects the option to request user authorization (OAuth) during installation:
2424

25-
```
26-
{% data variables.product.oauth_host_code %}/settings/apps/new?name=octocat-github-app&description=An%20Octocat%20App&callback_url=https://example.com&request_oauth_on_install=true&public=true&checks=write&events[]=check_run&events[]=check_suite
27-
```
25+
{% if currentVersion == "free-pro-team@latest" or currentVersion == "github-ae@next" or currentVersion ver_gt "enterprise-server@3.0" %}
26+
```
27+
{% data variables.product.oauth_host_code %}/settings/apps/new?name=octocat-github-app&description=An%20Octocat%20App&callback_urls[]=https://example.com&request_oauth_on_install=true&public=true&checks=write&events[]=check_run&events[]=check_suite
28+
```
29+
{% else %}
30+
```
31+
{% data variables.product.oauth_host_code %}/settings/apps/new?name=octocat-github-app&description=An%20Octocat%20App&callback_url=https://example.com&request_oauth_on_install=true&public=true&checks=write&events[]=check_run&events[]=check_suite
32+
```
33+
{% endif %}
2834

2935
The complete list of available query parameters, permissions, and events is listed in the sections below.
3036

@@ -34,8 +40,9 @@ The complete list of available query parameters, permissions, and events is list
3440
-----|------|-------------
3541
`name` | `string` | The name of the {% data variables.product.prodname_github_app %}. Give your app a clear and succinct name. Your app cannot have the same name as an existing GitHub user, unless it is your own user or organization name. A slugged version of your app's name will be shown in the user interface when your integration takes an action.
3642
`description` | `string` | A description of the {% data variables.product.prodname_github_app %}.
37-
`url` | `string` | The full URL of your {% data variables.product.prodname_github_app %}'s website homepage.
38-
`callback_url` | `string` | The full URL to redirect to after someone authorizes an installation. This URL is used if your app needs to identify and authorize user-to-server requests.
43+
`url` | `string` | The full URL of your {% data variables.product.prodname_github_app %}'s website homepage.{% if currentVersion == "free-pro-team@latest" or currentVersion == "github-ae@next" or currentVersion ver_gt "enterprise-server@3.0" %}
44+
`callback_urls` | `array of strings` | A full URL to redirect to after someone authorizes an installation. You can provide up to 10 callback URLs. These URLs are used if your app needs to identify and authorize user-to-server requests. For example, `callback_urls[]=https://example.com&callback_urls[]=https://example-2.com`.{% else %}
45+
`callback_url` | `string` | The full URL to redirect to after someone authorizes an installation. This URL is used if your app needs to identify and authorize user-to-server requests.{% endif %}
3946
`request_oauth_on_install` | `boolean` | If your app authorizes users using the OAuth flow, you can set this option to `true` to allow people to authorize the app when they install it, saving a step. If you select this option, the `setup_url` becomes unavailable and users will be redirected to your `callback_url` after installing the app.
4047
`setup_url` | `string` | The full URL to redirect to after someone installs the {% data variables.product.prodname_github_app %} if the app requires additional setup after installation.
4148
`setup_on_update` | `boolean` | Set to `true` to redirect people to the setup URL when installations have been updated, for example, after repositories are added or removed.

content/developers/apps/creating-ci-tests-with-the-checks-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,7 @@ Here are a few common problems and some suggested solutions. If you run into any
845845
**A:** If you see the following error, you haven't deleted the checkout of the repository in one or both of the `initiate_check_run` or `take_requested_action` methods:
846846

847847
```shell
848-
2018-11-26 16:55:13 - Git::GitExecuteError - git clone '--' 'https://x-access-token:v1.9b2080277016f797074c4debd350745f4257f8dd@github.com/codertocat/octocat-breeds.git' 'Octocat-breeds' 2>&1:fatal: destination path 'Octocat-breeds' already exists and is not an empty directory.:
848+
2018-11-26 16:55:13 - Git::GitExecuteError - git clone '--' 'https://x-access-token:ghs_9b2080277016f797074c4dEbD350745f4257@github.com/codertocat/octocat-breeds.git' 'Octocat-breeds' 2>&1:fatal: destination path 'Octocat-breeds' already exists and is not an empty directory.:
849849
```
850850

851851
Compare your code to the `server.rb` file to ensure you have the same code in your `initiate_check_run` and `take_requested_action` methods.

content/developers/apps/identifying-and-authorizing-users-for-github-apps.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ By default, the response takes the following form. The response parameters `expi
9494

9595
```json
9696
{
97-
"access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a",
97+
"access_token": "{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@3.1" or currentVersion == "github-ae@next" %}ghu_16C7e42F292c6912E7710c838347Ae178B4a"{% else %}e72e16c7e42f292c6912e7710c838347ae178b4a{% endif %}",
9898
"expires_in": 28800,
99-
"refresh_token": "r1.c1b4a2e77838347a7e420ce178f2e7c6912e1692",
99+
"refresh_token": "{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@3.1" or currentVersion == "github-ae@next" %}ghr_1B4a2e77838347a7E420ce178F2E7c6912E169246c34E1ccbF66C46812d16D5B1A9Dc86A1498"{% else %}r1.c1b4a2e77838347a7e420ce178f2e7c6912e1692{% endif %}",
100100
"refresh_token_expires_in": 15811200,
101101
"scope": "",
102102
"token_type": "bearer"
@@ -106,7 +106,7 @@ By default, the response takes the following form. The response parameters `expi
106106

107107
By default, the response takes the following form:
108108

109-
access_token=e72e16c7e42f292c6912e7710c838347ae178b4a&token_type=bearer
109+
access_token={% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@3.1" or currentVersion == "github-ae@next" %}ghu_16C7e42F292c6912E7710c838347Ae178B4a"{% else %}e72e16c7e42f292c6912e7710c838347ae178b4a{% endif %}&token_type=bearer
110110

111111
{% endif %}
112112

@@ -934,3 +934,11 @@ While most of your API interaction should occur using your server-to-server inst
934934
* [Get a workflow](/rest/reference/actions#get-a-workflow)
935935
* [Get workflow usage](/rest/reference/actions#get-workflow-usage)
936936
{% endif %}
937+
938+
{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@3.1" or currentVersion == "github-ae@next" %}
939+
940+
### Further reading
941+
942+
- "[About authentication to {% data variables.product.prodname_dotcom %}](/github/authenticating-to-github/about-authentication-to-github#githubs-token-formats)"
943+
944+
{% endif %}

0 commit comments

Comments
 (0)