Skip to content

Commit

Permalink
Merge branch 'main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
shati-patel authored Nov 10, 2020
2 parents 58f028e + 3b3d0a0 commit b661f6b
Show file tree
Hide file tree
Showing 35 changed files with 123 additions and 71 deletions.
18 changes: 18 additions & 0 deletions .devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Codespaces environment for docs.github.com
// For format details, see https://aka.ms/vscode-remote/devcontainer.json
{
"name": "docs.github.com",
"service": "container-doc",
"settings": {
"terminal.integrated.shell.linux": "/bin/bash",
"cSpell.language": ",en"
},
// Install pre-requisites, and start to serve docs.github.com locally
"postCreateCommand": "npm install && npm start",
"forwardPorts": [4000],
// Visual Studio Code extensions which help authoring for docs.github.com.
"extensions": [
"yzhang.markdown-all-in-one",
"streetsidesoftware.code-spell-checker"
]
}
2 changes: 1 addition & 1 deletion .github/allowed-actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// can be added it this list.

module.exports = [
'actions/cache@d1255ad9362389eac595a9ae406b8e8cb3331f16', //actions/cache@v2.1.2
'actions/cache@0781355a23dac32fd3bac414512f4b903437991a', //actions/cache@v2.1.3
'actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f', //actions/checkout@v2.3.4
'actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9', //actions/script@v3.0.0
'actions/labeler@5f867a63be70efff62b767459b009290364495eb', //actions/labeler@v2.2.0
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/automerge-dependencies.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
name: Auto Merge Dependency Updates

on:
- pull_request
- pull_request_review
pull_request:
paths:
- "package*.json"
- "Gemfile*"
- "Dockerfile"
- ".github/workflows/**"
pull_request_review:
types:
- edited
- submitted

jobs:
run:
Expand Down
12 changes: 4 additions & 8 deletions .github/workflows/browser-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,18 @@ jobs:
paths: '[".github/workflows/browser-test.yml","assets/**", "content/**", "data/**", "includes/**", "javascripts/**", "jest-puppeteer.config.js", "jest.config.js", "layouts/**", "lib/**", "middleware/**", "package-lock.json", "package.json", "server.js", "translations/**", "webpack.config.js"]'
build:
needs: see_if_should_skip
if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
runs-on: ubuntu-latest
steps:
# Each of these ifs needs to be repeated at each step to make sure the required check still runs
# Even if if doesn't do anything
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
name: Checkout
- name: Checkout
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f

- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
name: Install
- name: Install
uses: ianwalter/puppeteer@12728ddef82390d1ecd4732fb543f62177392fbb
with:
args: npm ci

- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
name: Test
- name: Test
uses: ianwalter/puppeteer@12728ddef82390d1ecd4732fb543f62177392fbb
with:
args: npm run browser-test
2 changes: 1 addition & 1 deletion .github/workflows/dry-run-sync-algolia-search-indices.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
with:
node-version: 14.x
- name: cache node modules
uses: actions/cache@d1255ad9362389eac595a9ae406b8e8cb3331f16
uses: actions/cache@0781355a23dac32fd3bac414512f4b903437991a
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/js-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
echo "::set-output name=dir::$(npm config get cache)"
- name: Cache node modules
uses: actions/cache@d1255ad9362389eac595a9ae406b8e8cb3331f16
uses: actions/cache@0781355a23dac32fd3bac414512f4b903437991a
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pa11y.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
echo "::set-output name=dir::$(npm config get cache)"
- name: Cache node modules
uses: actions/cache@d1255ad9362389eac595a9ae406b8e8cb3331f16
uses: actions/cache@0781355a23dac32fd3bac414512f4b903437991a
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sync-algolia-search-indices.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
with:
node-version: 14.x
- name: cache node modules
uses: actions/cache@d1255ad9362389eac595a9ae406b8e8cb3331f16
uses: actions/cache@0781355a23dac32fd3bac414512f4b903437991a
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-translations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
echo "::set-output name=dir::$(npm config get cache)"
- name: Cache node modules
uses: actions/cache@d1255ad9362389eac595a9ae406b8e8cb3331f16
uses: actions/cache@0781355a23dac32fd3bac414512f4b903437991a
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand Down Expand Up @@ -65,7 +65,7 @@ jobs:
echo "::set-output name=dir::$(npm config get cache)"
- name: Cache node modules
uses: actions/cache@d1255ad9362389eac595a9ae406b8e8cb3331f16
uses: actions/cache@0781355a23dac32fd3bac414512f4b903437991a
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
echo "::set-output name=dir::$(npm config get cache)"
- name: Cache node modules
uses: actions/cache@d1255ad9362389eac595a9ae406b8e8cb3331f16
uses: actions/cache@0781355a23dac32fd3bac414512f4b903437991a
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand Down
26 changes: 9 additions & 17 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,50 +31,42 @@ jobs:

test:
needs: see_if_should_skip
if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
test-group: [content, meta, rendering, routing, unit, links-and-images]
steps:
# Each of these ifs needs to be repeated at each step to make sure the required check still runs
# Even if if doesn't do anything
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
name: Check out repo
- name: Check out repo
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f

- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
name: Setup node
- name: Setup node
uses: actions/setup-node@56899e050abffc08c2b3b61f3ec6a79a9dc3223d
with:
node-version: 14.x

- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
name: Get npm cache directory
- name: Get npm cache directory
id: npm-cache
run: |
echo "::set-output name=dir::$(npm config get cache)"
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
name: Cache node modules
uses: actions/cache@d1255ad9362389eac595a9ae406b8e8cb3331f16
- name: Cache node modules
uses: actions/cache@0781355a23dac32fd3bac414512f4b903437991a
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
name: Install dependencies
- name: Install dependencies
run: npm ci

- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
name: Run build script
- name: Run build script
run: npm run build

- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
name: Run tests
- name: Run tests
run: npx jest tests/${{ matrix.test-group }}/
env:
NODE_OPTIONS: "--max_old_space_size=4096"
Expand Down
5 changes: 5 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,13 @@ Fork using GitHub Desktop:
- Once Desktop is set up, you can use it to [fork the repo](https://docs.github.com/en/desktop/contributing-and-collaborating-using-github-desktop/cloning-and-forking-repositories-from-github-desktop)!

Fork using the command line:

- [Fork the repo](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo#fork-an-example-repository) so that you can make your changes without affecting the original project until you're ready to merge them.

Fork with [GitHub Codespaces](https://github.com/features/codespaces):

- [Fork, edit, and preview](https://docs.github.com/en/free-pro-team@latest/github/developing-online-with-codespaces/creating-a-codespace) using [GitHub Codespaces](https://github.com/features/codespaces) without having to install and run the project locally.

### Make your update:
Make your changes to the file(s) you'd like to update. Here are some tips and tricks for [using the docs codebase](#working-in-the-githubdocs-repository).
- Are you making changes to the application code? You'll need **Node.js v14** to run the site locally. See [contributing/development.md](contributing/development.md).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ For more information, see "[Using release management for actions](/actions/creat

### Using inputs and outputs with an action

An action often accepts or requires inputs and generates outputs that you can use. For example, an action might require you to specify a path to a file, the name of a label, or other data it will uses as part of the action processing.
An action often accepts or requires inputs and generates outputs that you can use. For example, an action might require you to specify a path to a file, the name of a label, or other data it will use as part of the action processing.

To see the inputs and outputs of an action, check the `action.yml` or `action.yaml` in the root directory of the repository.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ versions:
{% data reusables.actions.enterprise-beta %}
{% data reusables.actions.enterprise-github-hosted-runners %}

To run a workflow manually, the workflow must be configured to run on the `workflow_dispatch` event. For more information, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows)."
### Configuring a workflow to run manually

To run a workflow manually, the workflow must be configured to run on the `workflow_dispatch` event. For more information about configuring the `workflow_dispatch` event, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows#workflow_dispatch)".

### Running a workflow on {% data variables.product.prodname_dotcom %}

Expand Down
8 changes: 8 additions & 0 deletions content/actions/reference/events-that-trigger-workflows.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,14 @@ You can manually trigger a workflow run using the {% data variables.product.prod

To trigger the custom `workflow_dispatch` webhook event using the REST API, you must send a `POST` request to a {% data variables.product.prodname_dotcom %} API endpoint and provide the `ref` and any required `inputs`. For more information, see the "[Create a workflow dispatch event](/rest/reference/actions/#create-a-workflow-dispatch-event)" REST API endpoint.

##### Example

To use the `workflow_dispatch` event, you need to include it as a trigger in your GitHub Actions workflow file. The example below only runs the workflow when it's manually triggered:

```yaml
on: workflow_dispatch
```
##### Example workflow configuration
This example defines the `name` and `home` inputs and prints them using the `github.event.inputs.name` and `github.event.inputs.home` contexts. If a `home` isn't provided, the default value 'The Octoverse' is printed.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ versions:

### About {% data variables.product.prodname_actions %} permissions for your enterprise

When you enable {% data variables.product.prodname_actions %} on {% data variables.product.prodname_ghe_server %}, it is enabled for all organizations in your enterprise. You can choose to disable {% data variables.product.prodname_actions %} for all organizations in your enterprise, or only allow specific organizations. You can also limit the use of public actions, so that people can only use local actions that exist in an organization.
When you enable {% data variables.product.prodname_actions %} on {% data variables.product.prodname_ghe_server %}, it is enabled for all organizations in your enterprise. You can choose to disable {% data variables.product.prodname_actions %} for all organizations in your enterprise, or only allow specific organizations. You can also limit the use of public actions, so that people can only use local actions that exist in your enterprise.

### Managing {% data variables.product.prodname_actions %} permissions for your enterprise

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ You can disable all workflows for a repository or set a policy that configures w
{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.sidebar-settings %}
{% data reusables.repositories.settings-sidebar-actions %}
1. Under **Actions permissions**, select **Allow specific actions** and add your required actions to the list.
1. Under **Actions permissions**, select **Allow select actions** and add your required actions to the list.
![Add actions to allow list](/assets/images/help/repository/actions-policy-allow-list.png)
2. Click **Save**.
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ You can disable all workflows for an organization or set a policy that configure
{% data reusables.profile.access_org %}
{% data reusables.organizations.org_settings %}
{% data reusables.organizations.settings-sidebar-actions %}
1. Under **Policies**, select **Allow specific actions** and add your required actions to the list.
1. Under **Policies**, select **Allow select actions** and add your required actions to the list.
![Add actions to allow list](/assets/images/help/organizations/actions-policy-allow-list.png)
1. Click **Save**.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ You can disable all workflows for an enterprise or set a policy that configures
{% data reusables.enterprise-accounts.access-enterprise %}
{% data reusables.enterprise-accounts.policies-tab %}
{% data reusables.enterprise-accounts.actions-tab %}
1. Under **Policies**, select **Allow specific actions** and add your required actions to the list.
1. Under **Policies**, select **Allow select actions** and add your required actions to the list.
![Add actions to allow list](/assets/images/help/organizations/enterprise-actions-policy-allow-list.png)

### Enabling workflows for private repository forks
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ You can authenticate to {% data variables.product.prodname_registry %} with Apac

In the `servers` tag, add a child `server` tag with an `id`, replacing *USERNAME* with your {% data variables.product.prodname_dotcom %} username, and *TOKEN* with your personal access token.

In the `repositories` tag, configure a repository by mapping the `id` of the repository to the `id` you added in the `server` tag containing your credentials. Replace {% if enterpriseServerVersions contains currentVersion %}*HOSTNAME* with the host name of your {% data variables.product.prodname_ghe_server %} instance, {% endif %}*REPOSITORY* with the name of the repository you'd like to publish a package to or install a package from, and *OWNER* with the name of the user or organization account that owns the repository. {% data reusables.package_registry.lowercase-name-field %}
In the `repositories` tag, configure a repository by mapping the `id` of the repository to the `id` you added in the `server` tag containing your credentials. Replace {% if enterpriseServerVersions contains currentVersion %}*HOSTNAME* with the host name of your {% data variables.product.prodname_ghe_server %} instance, {% endif %}*REPOSITORY* with the name of the repository you'd like to publish a package to or install a package from, and *OWNER* with the name of the user or organization account that owns the repository. Because uppercase letters aren't supported, you must use lowercase letters for the repository owner even if the {% data variables.product.prodname_dotcom %} user or organization name contains uppercase letters.

If you want to interact with multiple repositories, you can add each repository to separate `repository` children in the `repositories` tag, mapping the `id` of each to the credentials in the `servers` tag.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,17 @@ For more information, see "[Docker login](https://docs.docker.com/engine/referen

{% data reusables.package_registry.package-registry-with-github-tokens %}

### Publishing a package
### Publishing an image

{% data reusables.package_registry.docker_registry_deprecation_status %}

{% data variables.product.prodname_registry %} supports multiple top-level Docker images per repository. A repository can have any number of image tags. You may experience degraded service publishing or installing Docker images larger than 10GB, layers are capped at 5GB each. For more information, see "[Docker tag](https://docs.docker.com/engine/reference/commandline/tag/)" in the Docker documentation.
{% note %}

**Note:** Image names must only use lowercase letters.

{% data reusables.package_registry.lowercase-name-field %}
{% endnote %}

{% data variables.product.prodname_registry %} supports multiple top-level Docker images per repository. A repository can have any number of image tags. You may experience degraded service publishing or installing Docker images larger than 10GB, layers are capped at 5GB each. For more information, see "[Docker tag](https://docs.docker.com/engine/reference/commandline/tag/)" in the Docker documentation.

{% data reusables.package_registry.viewing-packages %}

Expand Down Expand Up @@ -178,11 +182,11 @@ $ docker push docker.<em>HOSTNAME</em>/octocat/octo-app/monalisa:1.0
```
{% endif %}

### Installing a package
### Downloading an image

{% data reusables.package_registry.docker_registry_deprecation_status %}

You can use the `docker pull` command to install a docker image from {% data variables.product.prodname_registry %}, replacing *OWNER* with the name of the user or organization account that owns the repository, *REPOSITORY* with the name of the repository containing your project, *IMAGE_NAME* with name of the package or image,{% if enterpriseServerVersions contains currentVersion %}*HOSTNAME* with the host name of your {% data variables.product.prodname_ghe_server %} instance, {% endif %} and *TAG_NAME* with tag for the image you want to install. {% data reusables.package_registry.lowercase-name-field %}
You can use the `docker pull` command to install a docker image from {% data variables.product.prodname_registry %}, replacing *OWNER* with the name of the user or organization account that owns the repository, *REPOSITORY* with the name of the repository containing your project, *IMAGE_NAME* with name of the package or image,{% if enterpriseServerVersions contains currentVersion %}*HOSTNAME* with the host name of your {% data variables.product.prodname_ghe_server %} instance, {% endif %} and *TAG_NAME* with tag for the image you want to install.

{% if currentVersion == "free-pro-team@latest" %}
```shell
Expand Down
Loading

0 comments on commit b661f6b

Please sign in to comment.