Skip to content

Commit cb5725b

Browse files
authored
Merge pull request github#24116 from github/repo-sync
repo sync
2 parents eb7379e + 7236594 commit cb5725b

File tree

10 files changed

+90
-109
lines changed

10 files changed

+90
-109
lines changed

.github/workflows/automerge-dependencies.yml renamed to .github/workflows/auto-close-dependencies.yml

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
name: Auto Merge Dependency Updates
1+
name: Auto Close Open Source Dependency Updates
22

33
# **What it does**:
4-
# - automerge-internal: Automatically merge dependabot's pull requests in the internal repository.
54
# - close-external: Automatically close dependabot's pull requests in the open-source repository.
65
# **Why we have it**:
7-
# - automerge-internal: To keep our dependencies up-to-date, to avoid security issues.
86
# - close-external: To avoid duplicating updates against the internal repository.
97
# **Who does it impact**: It helps docs engineering focus on higher value work.
108

@@ -25,22 +23,6 @@ permissions:
2523
pull-requests: write
2624

2725
jobs:
28-
automerge-internal:
29-
if: >-
30-
${{
31-
github.repository == 'github/docs-internal' &&
32-
github.event.pull_request.number &&
33-
github.event.pull_request.base.ref == 'main' &&
34-
github.event.pull_request.user.login == 'dependabot[bot]' &&
35-
github.event.pull_request.state == 'open'
36-
}}
37-
runs-on: ubuntu-latest
38-
steps:
39-
- uses: tjenkinson/gh-action-auto-merge-dependency-updates@c47f6255e06f36e84201ee940466e731ffa6e885
40-
with:
41-
repo-token: ${{ secrets.GITHUB_TOKEN }}
42-
allowed-actors: dependabot[bot]
43-
4426
close-external:
4527
if: >-
4628
${{

content/actions/publishing-packages/publishing-nodejs-packages.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ You can trigger a workflow to publish your package every time you publish a new
5555

5656
To perform authenticated operations against the npm registry in your workflow, you'll need to store your npm authentication token as a secret. For example, create a repository secret called `NPM_TOKEN`. For more information, see "[AUTOTITLE](/actions/security-guides/encrypted-secrets)."
5757

58-
By default, npm uses the `name` field of the *package.json* file to determine the name of your published package. When publishing to a global namespace, you only need to include the package name. For example, you would publish a package named `npm-hello-world-test` to `https://www.npmjs.com/package/npm-hello-world-test`.
58+
By default, npm uses the `name` field of the *package.json* file to determine the name of your published package. When publishing to a global namespace, you only need to include the package name. For example, you would publish a package named `my-package` to `https://www.npmjs.com/package/my-package`.
5959

60-
If you're publishing a package that includes a scope prefix, include the scope in the name of your *package.json* file. For example, if your npm scope prefix is octocat and the package name is hello-world, the `name` in your *package.json* file should be `@octocat/hello-world`. If your npm package uses a scope prefix and the package is public, you need to use the option `npm publish --access public`. This is an option that npm requires to prevent someone from publishing a private package unintentionally.
60+
If you're publishing a package that includes a scope prefix, include the scope in the name of your *package.json* file. For example, if your npm scope prefix is "octocat" and the package name is "hello-world", the `name` in your *package.json* file should be `@octocat/hello-world`. If your npm package uses a scope prefix and the package is public, you need to use the option `npm publish --access public`. This is an option that npm requires to prevent someone from publishing a private package unintentionally.
6161

6262
This example stores the `NPM_TOKEN` secret in the `NODE_AUTH_TOKEN` environment variable. When the `setup-node` action creates an *.npmrc* file, it references the token from the `NODE_AUTH_TOKEN` environment variable.
6363

@@ -100,11 +100,11 @@ You can trigger a workflow to publish your package every time you publish a new
100100

101101
Linking your package to {% data variables.product.prodname_registry %} using the `repository` key is optional. If you choose not to provide the `repository` key in your *package.json* file, then {% data variables.product.prodname_registry %} publishes a package in the {% data variables.product.prodname_dotcom %} repository you specify in the `name` field of the *package.json* file. For example, a package named `@my-org/test` is published to the `my-org/test` {% data variables.product.prodname_dotcom %} repository. If the `url` specified in the `repository` key is invalid, your package may still be published however it won't be linked to the repository source as intended.
102102

103-
If you do provide the `repository` key in your *package.json* file, then the repository in that key is used as the destination npm registry for {% data variables.product.prodname_registry %}. For example, publishing the below *package.json* results in a package named `my-amazing-package` published to the `octocat/my-other-repo` {% data variables.product.prodname_dotcom %} repository. Once published, only the repository source is updated, and the package doesn't inherit any permissions from the destination repository.
103+
If you do provide the `repository` key in your *package.json* file, then the repository in that key is used as the destination npm registry for {% data variables.product.prodname_registry %}. For example, publishing the below *package.json* results in a package named `my-package` published to the `octocat/my-other-repo` {% data variables.product.prodname_dotcom %} repository. Once published, only the repository source is updated, and the package doesn't inherit any permissions from the destination repository.
104104

105105
```json
106106
{
107-
"name": "@octocat/my-amazing-package",
107+
"name": "@octocat/my-package",
108108
"repository": {
109109
"type": "git",
110110
"url": "https://github.com/octocat/my-other-repo.git"

content/packages/learn-github-packages/connecting-a-repository-to-a-package.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ When you publish a package that is scoped to a personal account or an organizati
3838
```shell
3939
LABEL org.opencontainers.image.source=https://{% ifversion fpt or ghec %}github.com{% else %}HOSTNAME{% endif %}/OWNER/REPO
4040
```
41-
For example, if you're the user `monalisa` and own `my-repo`, and {% data variables.location.product_location %} hostname is `github.companyname.com`, you would add this line to your Dockerfile:
41+
For example, if you're the user `octocat` and own `my-repo`{% ifversion ghes > 3.4 %}, and your {% data variables.location.product_location %} hostname is `github.companyname.com`,{% endif %} you would add this line to your Dockerfile:
4242
```shell
43-
LABEL org.opencontainers.image.source=https://{% ifversion fpt or ghec %}github.com{% else %}{% data reusables.package_registry.container-registry-example-hostname %}{% endif %}/monalisa/my-repo
43+
LABEL org.opencontainers.image.source=https://{% ifversion fpt or ghec %}github.com{% else %}{% data reusables.package_registry.container-registry-example-hostname %}{% endif %}/octocat/my-repo
4444
```
4545
For more information, see "[LABEL](https://docs.docker.com/engine/reference/builder/#label)" in the official Docker documentation and "[Pre-defined Annotation Keys](https://github.com/opencontainers/image-spec/blob/master/annotations.md#pre-defined-annotation-keys)" in the `opencontainers/image-spec` repository.
4646

@@ -49,16 +49,17 @@ When you publish a package that is scoped to a personal account or an organizati
4949
```shell
5050
$ docker build -t hello_docker .
5151
```
52-
3. Optionally, review details for the Docker image you want to tag.
52+
53+
3. Optionally, review the details of the Docker image you just created.
5354
```shell
5455
$ docker images
55-
> REPOSITORY TAG IMAGE ID CREATED SIZE
56-
> {% data reusables.package_registry.container-registry-example-hostname %}/my-org/hello_docker latest 38f737a91f39 47 hours ago 91.7MB
57-
> {% data reusables.package_registry.container-registry-example-hostname %}/my-username/hello_docker latest 38f737a91f39 47 hours ago 91.7MB
58-
> hello-world latest fce289e99eb9 16 months ago 1.84kB
56+
> REPOSITORY TAG IMAGE ID CREATED SIZE
57+
> hello_docker latest 142e665b1faa 5 seconds ago 125MB
58+
> redis latest afb5e116cac0 3 months ago 111MB
59+
> alpine latest a6215f271958 5 months ago 5.29MB
5960
```
6061

61-
4. Tag your Docker image with your desired image name and hosting destination.
62+
4. Assign a name and hosting destination to your Docker image.
6263
```shell
6364
$ docker tag IMAGE_NAME {% data reusables.package_registry.container-registry-hostname %}/NAMESPACE/NEW_IMAGE_NAME:TAG
6465
```
@@ -67,7 +68,7 @@ When you publish a package that is scoped to a personal account or an organizati
6768

6869
For example:
6970
```shell
70-
$ docker tag 38f737a91f39 {% data reusables.package_registry.container-registry-example-hostname %}/monalisa/hello_docker:latest
71+
$ docker tag 38f737a91f39 {% ifversion fpt or ghec %}ghcr.io{% elsif ghes > 3.4 %}{% data reusables.package_registry.container-registry-example-hostname %}{% endif %}/octocat/hello_docker:latest
7172
```
7273

7374
5. If you haven't already, authenticate to the {% data variables.product.prodname_container_registry %}. For more information, see "[AUTOTITLE](/packages/working-with-a-github-packages-registry/working-with-the-container-registry#authenticating-to-the-container-registry)."
@@ -83,6 +84,6 @@ When you publish a package that is scoped to a personal account or an organizati
8384
```
8485
For example:
8586
```shell
86-
$ docker push {% data reusables.package_registry.container-registry-example-hostname %}/monalisa/hello_docker:latest
87+
$ docker push {% ifversion fpt or ghec %}ghcr.io{% elsif ghes > 3.4 %}{% data reusables.package_registry.container-registry-example-hostname %}{% endif %}/octocat/hello_docker:latest
8788
```
8889
{% endif %}

content/packages/learn-github-packages/deleting-and-restoring-a-package.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ You can restore a deleted package or version if:
190190
- You restore the package within 30 days of its deletion.
191191
- The same package namespace and version is still available and not reused for a new package.
192192

193-
For example, if you have a deleted RubyGems package named `octo-package` that was scoped to the repo `octo-repo-owner/octo-repo`, then you can only restore the package if the package namespace `rubygem.pkg.github.com/octo-repo-owner/octo-repo/octo-package` is still available, and 30 days have not yet passed.
193+
For example, if you're the user `octocat`, and you have a deleted RubyGems package named `my-package` that was scoped to the repo `octocat/my-repo`, then you can only restore the package if the package namespace `rubygem.pkg.github.com/octocat/my-repo/my-package` is still available, and 30 days have not yet passed.
194194

195195
{% ifversion fpt or ghec %}
196196
To restore a deleted package, you must also meet one of these permission requirements:

content/packages/working-with-a-github-packages-registry/working-with-the-container-registry.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ Docker CLI example showing an image pulled by its name and the `1.14.1` version
115115
> fd45dd1aad5a: Pull complete
116116
> db6eb50c2d36: Pull complete
117117
> Digest: sha256:ae3b135f133155b3824d8b1f62959ff8a72e9cf9e884d88db7895d8544010d8e
118-
> Status: Downloaded newer image for {% data reusables.package_registry.container-registry-hostname %}/orgname/image-name/release:1.14.1
119-
> {% data reusables.package_registry.container-registry-hostname %}/orgname/image-name/release:1.14.1
118+
> Status: Downloaded newer image for {% data reusables.package_registry.container-registry-hostname %}/NAMESPACE/IMAGE_NAME/release:1.14.1
119+
> {% data reusables.package_registry.container-registry-hostname %}/NAMESPACE/IMAGE_NAME/release:1.14.1
120120
```
121121

122122
Replace `NAMESPACE` with the name of the personal account or organization to which the image is scoped.
@@ -125,10 +125,10 @@ Replace `NAMESPACE` with the name of the personal account or organization to whi
125125

126126
```shell
127127
$ docker pull {% data reusables.package_registry.container-registry-hostname %}/NAMESPACE/IMAGE_NAME:latest
128-
> latest: Pulling from user/image-name
128+
> latest: Pulling from NAMESPACE/IMAGE_NAME
129129
> Digest: sha256:b3d3e366b55f9a54599220198b3db5da8f53592acbbb7dc7e4e9878762fc5344
130-
> Status: Downloaded newer image for {% data reusables.package_registry.container-registry-hostname %}/user/image-name:latest
131-
> {% data reusables.package_registry.container-registry-hostname %}/user/image-name:latest
130+
> Status: Downloaded newer image for {% data reusables.package_registry.container-registry-hostname %}/NAMESPACE/IMAGE_NAME:latest
131+
> {% data reusables.package_registry.container-registry-hostname %}/NAMESPACE/IMAGE_NAME:latest
132132
```
133133

134134
Replace `NAMESPACE` with the name of the personal account or organization to which the image is scoped.
@@ -146,8 +146,7 @@ This example builds the `hello_docker` image:
146146
```shell
147147
$ docker images
148148
> REPOSITORY TAG IMAGE ID CREATED SIZE
149-
> {% data reusables.package_registry.container-registry-hostname %}/my-org/hello_docker latest 38f737a91f39 47 hours ago 91.7MB
150-
> {% data reusables.package_registry.container-registry-hostname %}/my-username/hello_docker latest 38f737a91f39 47 hours ago 91.7MB
149+
> {% data reusables.package_registry.container-registry-hostname %}/my-org/hello_docker latest 38f737a91f39 47 hours ago 91.7MB
151150
> hello-world latest fce289e99eb9 16 months ago 1.84kB
152151
```
153152

@@ -174,10 +173,10 @@ Key | Description
174173
| `org.opencontainers.image.description` | A text-only description limited to 512 characters. This description will appear on the package page, below the name of the package.
175174
| `org.opencontainers.image.licenses` | An SPDX license identifier such as "MIT," limited to 256 characters. The license will appear on the package page, in the "Details" sidebar. For more information, see [SPDX License List](https://spdx.org/licenses/).
176175

177-
To add a key as a Docker label, we recommend using the `LABEL` instruction in your `Dockerfile`. For example, if you're the user `monalisa` and you own `my-repo`, and your image is distributed under the terms of the MIT license, you would add the following lines to your `Dockerfile`:
176+
To add a key as a Docker label, we recommend using the `LABEL` instruction in your `Dockerfile`. For example, if you're the user `octocat` and you own `my-repo`, and your image is distributed under the terms of the MIT license, you would add the following lines to your `Dockerfile`:
178177

179178
```dockerfile
180-
LABEL org.opencontainers.image.source=https://{% ifversion fpt or ghec %}github.com{% else %}HOSTNAME{% endif %}/monalisa/my-repo
179+
LABEL org.opencontainers.image.source=https://{% ifversion fpt or ghec %}github.com{% else %}HOSTNAME{% endif %}/octocat/my-repo
181180
LABEL org.opencontainers.image.description="My container image"
182181
LABEL org.opencontainers.image.licenses=MIT
183182
```
@@ -186,7 +185,7 @@ Alternatively, you can add labels to an image at buildtime with the `docker buil
186185

187186
```shell
188187
$ docker build \
189-
--label "org.opencontainers.image.source=https://{% ifversion fpt or ghec %}github.com{% else %}HOSTNAME{% endif %}/monalisa/my-repo" \
188+
--label "org.opencontainers.image.source=https://{% ifversion fpt or ghec %}github.com{% else %}HOSTNAME{% endif %}/octocat/my-repo" \
190189
--label "org.opencontainers.image.description=My container image" \
191190
--label "org.opencontainers.image.licenses=MIT"
192191
```

0 commit comments

Comments
 (0)