Skip to content

Commit 28a9408

Browse files
Merge branch 'main' into main
2 parents 5d1f58c + 6b041de commit 28a9408

18 files changed

+248
-38
lines changed

.github/workflows/azure-prod-build-deploy.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,55 @@ jobs:
7171
- name: Merge docs-early-access repo's folders
7272
run: .github/actions-scripts/merge-early-access.sh
7373

74+
- name: Clone Simplified Chinese
75+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
76+
with:
77+
repository: github/docs-internal.zh-cn
78+
token: ${{ secrets.DOCUBOT_REPO_PAT }}
79+
path: translations/zh-cn
80+
81+
- name: Clone Japanese
82+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
83+
with:
84+
repository: github/docs-internal.ja-jp
85+
token: ${{ secrets.DOCUBOT_REPO_PAT }}
86+
path: translations/ja-jp
87+
88+
- name: Clone Spanish
89+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
90+
with:
91+
repository: github/docs-internal.es-es
92+
token: ${{ secrets.DOCUBOT_REPO_PAT }}
93+
path: translations/es-es
94+
95+
- name: Clone Portuguese
96+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
97+
with:
98+
repository: github/docs-internal.pt-br
99+
token: ${{ secrets.DOCUBOT_REPO_PAT }}
100+
path: translations/pt-br
101+
102+
- name: Clone German
103+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
104+
with:
105+
repository: github/docs-internal.de-de
106+
token: ${{ secrets.DOCUBOT_REPO_PAT }}
107+
path: translations/de-de
108+
109+
- name: Clone French
110+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
111+
with:
112+
repository: github/docs-internal.fr-fr
113+
token: ${{ secrets.DOCUBOT_REPO_PAT }}
114+
path: translations/fr-fr
115+
116+
- name: Clone Russian
117+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
118+
with:
119+
repository: github/docs-internal.ru-ru
120+
token: ${{ secrets.DOCUBOT_REPO_PAT }}
121+
path: translations/ru-ru
122+
74123
- name: Clone Korean
75124
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
76125
with:
@@ -85,6 +134,13 @@ jobs:
85134
# unnecessary weight to the container image.
86135
- name: Delete old checked in translation directories (TEMPORARY)
87136
run: |
137+
rm -fr translations/zh-CN
138+
rm -fr translations/ja-JP
139+
rm -fr translations/es-ES
140+
rm -fr translations/pt-BR
141+
rm -fr translations/de-DE
142+
rm -fr translations/fr-FR
143+
rm -fr translations/ru-RU
88144
rm -fr translations/ko-KR
89145
90146
- name: 'Build and push image'

.github/workflows/sync-search-pr.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,20 @@ jobs:
4646
- name: Check out repo
4747
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
4848

49+
- name: Cache node_modules
50+
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7
51+
with:
52+
path: node_modules
53+
key: ${{ runner.os }}-node_modules-${{ hashFiles('package*.json') }}
54+
4955
- name: Setup node
5056
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516
5157
with:
5258
node-version: '16.17.0'
5359
cache: npm
5460

5561
- name: Install dependencies
56-
run: npm ci
62+
run: npm install --prefer-offline --no-audit --ignore-scripts
5763

5864
- name: Cache nextjs build
5965
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7

content/actions/creating-actions/creating-a-docker-container-action.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,11 @@ git push --follow-tags
192192

193193
## Testing out your action in a workflow
194194

195-
Now you're ready to test your action out in a workflow. When an action is in a private repository, the action can only be used in workflows in the same repository. Public actions can be used by workflows in any repository.
195+
Now you're ready to test your action out in a workflow.
196+
197+
{% ifversion private-actions %}- When an action is in a private repository, you can control who can access it. For more information, see "[Allowing access to components in a private repository](/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-a-private-repository)."{% else %}- When an action is in a private repository, the action can only be used in workflows in the same repository.{% endif %}
198+
{% ifversion ghes or ghec or ghae %}{% ifversion internal-actions %}- When an action is in an internal repository, you can control who can access it. For more information, see "[Allowing access to components in an internal repository](/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository)."{% else %}- When an action is in an internal repository, the action can only be used in workflows in the same repository.{% endif %}{% endif %}
199+
- Public actions can be used by workflows in any repository.
196200

197201
{% data reusables.actions.enterprise-marketplace-actions %}
198202

content/actions/creating-actions/dockerfile-support-for-github-actions.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,8 @@ Using the example Dockerfile above, {% data variables.product.product_name %} wi
8585

8686
# `$#` expands to the number of arguments and `$@` expands to the supplied `args`
8787
printf '%d args:' "$#"
88-
printf $' \'%s\'' "$@"
89-
printf ' <%s>' "$@"
90-
echo
88+
printf " '%s'" "$@"
89+
printf '\n'
9190
```
9291

9392
Your code must be executable. Make sure the `entrypoint.sh` file has `execute` permissions before using it in a workflow. You can modify the permission from your terminal using this command:

content/actions/creating-actions/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ children:
2121
- /dockerfile-support-for-github-actions
2222
- /setting-exit-codes-for-actions
2323
- /publishing-actions-in-github-marketplace
24+
- /sharing-actions-and-workflows-from-your-private-repository
2425
- /sharing-actions-and-workflows-with-your-enterprise
26+
- /sharing-actions-and-workflows-with-your-organization
2527
- /releasing-and-maintaining-actions
2628
- /developing-a-third-party-cli-action
2729
---
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
title: Sharing actions and workflows from your private repository
3+
intro: You can share an action or reusable workflow without publishing them publicly.
4+
versions:
5+
fpt: '*'
6+
type: tutorial
7+
topics:
8+
- Actions
9+
- Action development
10+
shortTitle: Share from your private repository
11+
---
12+
13+
## About {% data variables.product.prodname_actions %} access to private repositories
14+
15+
You can share actions and reusable workflows from your private repository, without publishing them publicly, by allowing {% data variables.product.prodname_actions %} workflows to access a private repository that contains the action or reusable workflow.
16+
17+
Any actions or reusable workflows stored in the private repository can be used in workflows defined in other private repositories owned by the same organization or user. Actions and reusable workflows stored in private repositories cannot be used in public repositories.
18+
19+
{% warning %}
20+
21+
**Warning**:
22+
- If you make a private repository accessible to {% data variables.product.prodname_actions %} workflows in other repositories, outside collaborators on the other repositories can indirectly access the private repository, even though they do not have direct access to these repositories. The outside collaborators can view logs for workflow runs when actions or workflows from the private repository are used.
23+
- {% data reusables.actions.scoped-token-note %}
24+
25+
{% endwarning %}
26+
27+
## Sharing actions and workflows from your private repository
28+
29+
1. Store the action or reusable workflow in a private repository. For more information, see "[About repository visibility](/repositories/creating-and-managing-repositories/about-repositories#about-repository-visibility)."
30+
1. Configure the repository to allow access to workflows in other private repositories. For more information, see "[Allowing access to components in a private repository](/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-a-private-repository)."
31+
32+
## Further reading
33+
34+
- "[Reusing workflows](/actions/using-workflows/reusing-workflows)"

content/actions/creating-actions/sharing-actions-and-workflows-with-your-enterprise.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Sharing actions and workflows with your enterprise
3-
intro: You can share an action or workflow with your enterprise without publishing the action or workflow publicly.
3+
intro: You can share an action or reusable workflow with your enterprise without publishing the action or workflow publicly.
44
versions:
55
feature: internal-actions
66
type: tutorial
@@ -10,22 +10,24 @@ topics:
1010
shortTitle: Share with your enterprise
1111
---
1212

13-
## About {% data variables.product.prodname_actions %} access to internal repositories
13+
## About {% data variables.product.prodname_actions %} access to internal {% ifversion private-actions %}and private {% endif %}repositories
1414

15-
If your organization is owned by an enterprise account, you can share actions and workflows within your enterprise, without publishing the action or workflow publicly, by allowing {% data variables.product.prodname_actions %} workflows to access an internal repository that contains the action or workflow.
15+
If your organization is owned by an enterprise account, you can share actions and reusable workflows within your enterprise, without publishing them publicly, by allowing {% data variables.product.prodname_actions %} workflows to access an internal {% ifversion private-actions %}or private {% endif %}repository that contains the action or reusable workflow.
1616

17-
Any actions or workflows stored in the internal repository can be used in workflows defined in other private and internal repositories owned by the same organization, or by any organization owned by the enterprise. Actions and workflows stored in internal repositories cannot be used in public repositories.
17+
Any actions or reusable workflows stored in the internal {% ifversion private-actions %}or private {% endif %}repository can be used in workflows defined in other internal or private repositories owned by the same organization, or by any organization owned by the enterprise. Actions and reusable workflows stored in internal repositories cannot be used in public repositories {% ifversion private-actions %}and actions and reusable workflows stored in private repositories cannot be used in public or internal repositories{% endif %}.
1818

1919
{% warning %}
2020

21-
**Warning**: {% data reusables.actions.outside-collaborators-internal-actions %}
21+
**Warning**:
22+
- {% data reusables.actions.outside-collaborators-actions %}
23+
- {% data reusables.actions.scoped-token-note %}
2224

2325
{% endwarning %}
2426

2527
## Sharing actions and workflows with your enterprise
2628

27-
1. Store the action or workflow in an internal repository. For more information, see "[About repositories](/repositories/creating-and-managing-repositories/about-repositories#about-internal-repositories)."
28-
1. Configure the repository to allow access to workflows in other private and internal repositories. For more information, see "[Managing {% data variables.product.prodname_actions %} settings for a repository](/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository)."
29+
1. Store the action or reusable workflow in an internal {% ifversion private-actions %}or private {% endif %}repository. For more information, see "[About repositories](/repositories/creating-and-managing-repositories/about-repositories)."
30+
1. Configure the repository to allow access to workflows in other internal {% ifversion private-actions %}or private {% endif %}repositories. For more information, see {% ifversion private-actions %}"[Allowing access to components in a private repository](/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-a-private-repository)" and {% endif %}"[Allowing access to components in an internal repository](/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository)."
2931

3032
## Further reading
3133

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
title: Sharing actions and workflows with your organization
3+
intro: You can share an action or reusable workflow with your organization without publishing the action or workflow publicly.
4+
versions:
5+
fpt: '*'
6+
type: tutorial
7+
topics:
8+
- Actions
9+
- Action development
10+
shortTitle: Share with your organization
11+
---
12+
13+
## About {% data variables.product.prodname_actions %} access to private {% ifversion internal-actions %} or internal {% endif %}repositories
14+
15+
You can share actions and reusable workflows within your organization, without publishing them publicly, by allowing {% data variables.product.prodname_actions %} workflows to access a private {% ifversion internal-actions %} or internal {% endif %}repository that contains the action or reusable workflow.
16+
17+
Any actions or reusable workflows stored in the private repository can be used in workflows defined in other private {% ifversion internal-actions %} or internal {% endif %}repositories owned by the same organization. Actions and reusable workflows stored in internal repositories cannot be used in public repositories {% ifversion private-actions %}and actions and reusable workflows stored in private repositories cannot be used in public or internal repositories{% endif %}.
18+
19+
{% warning %}
20+
21+
**Warning**:
22+
- {% data reusables.actions.outside-collaborators-actions %}
23+
- {% data reusables.actions.scoped-token-note %}
24+
25+
{% endwarning %}
26+
27+
## Sharing actions and workflows with your organization
28+
29+
1. Store the action or reusable workflow in a private {% ifversion internal-actions %} or internal {% endif %}repository. For more information, see "[About repository visibility](/repositories/creating-and-managing-repositories/about-repositories#about-repository-visibility)."
30+
1. Configure the repository to allow access to workflows in other private repositories. For more information, see "[Allowing access to components in a private repository](/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-a-private-repository)."
31+
32+
## Further reading
33+
34+
- "[Reusing workflows](/actions/using-workflows/reusing-workflows)"

content/actions/security-guides/security-hardening-for-github-actions.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,12 @@ The same principles described above for using third-party actions also apply to
194194
{% endif %}
195195

196196
{% ifversion internal-actions %}
197-
## Allowing workflows to access internal repositories
197+
## Allowing workflows to access internal {% ifversion private-actions %}and private {% endif %}repositories
198+
199+
{% data reusables.actions.outside-collaborators-actions %} For more information, see "[Sharing actions and workflows with your enterprise](/actions/creating-actions/sharing-actions-and-workflows-with-your-enterprise)."
200+
201+
{% data reusables.actions.scoped-token-note %}
198202

199-
{% data reusables.actions.outside-collaborators-internal-actions %} For more information, see "[Sharing actions and workflows with your enterprise](/actions/creating-actions/sharing-actions-and-workflows-with-your-enterprise)."
200203
{% endif %}
201204

202205
{% ifversion allow-actions-to-approve-pr %}

content/actions/using-workflows/reusing-workflows.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ A reusable workflow can be used by another workflow if {% ifversion ghes or ghec
5555

5656
* Both workflows are in the same repository.
5757
* The called workflow is stored in a public repository{% ifversion actions-workflow-policy %}, and your {% ifversion ghec %}enterprise{% else %}organization{% endif %} allows you to use public reusable workflows{% endif %}.{% ifversion ghes or ghec or ghae %}
58-
* The called workflow is stored in an internal repository and the settings for that repository allow it to be accessed. For more information, see {% ifversion internal-actions %}"[Sharing actions and workflows with your enterprise](/actions/creating-actions/sharing-actions-and-workflows-with-your-enterprise){% else %}"[Managing {% data variables.product.prodname_actions %} settings for a repository](/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository){% endif %}."{% endif %}
58+
* The called workflow is stored in an internal repository and the settings for that repository allow it to be accessed. For more information, see {% ifversion internal-actions %}"[Sharing actions and workflows with your enterprise](/actions/creating-actions/sharing-actions-and-workflows-with-your-enterprise){% else %}"[Managing {% data variables.product.prodname_actions %} settings for a repository](/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository){% endif %}."{% endif %}{% ifversion private-actions %}
59+
* The called workflow is stored in a private repository and the settings for that repository allow it to be accessed. For more information, see {% ifversion ghes or ghec or ghae %}"[Sharing actions and workflows with your enterprise](/actions/creating-actions/sharing-actions-and-workflows-with-your-enterprise)."{% else %}"[Sharing actions and workflows with your organization](/actions/creating-actions/sharing-actions-and-workflows-with-your-organization)" and "[Sharing actions and workflows from your private repository](/actions/creating-actions/sharing-actions-and-workflows-from-your-private-repository)."{% endif %}
60+
{% endif %}
5961

6062
## Using runners
6163

@@ -80,7 +82,7 @@ Called workflows that are owned by the same user or organization{% ifversion ghe
8082
{% else %}
8183
* Reusable workflows can't call other reusable workflows.
8284
{% endif %}
83-
* Reusable workflows stored within a private repository can only be used by workflows within the same repository.
85+
{% ifversion private-actions %}{% else %}* Reusable workflows stored within a private repository can only be used by workflows within the same repository.{% endif %}
8486
* Any environment variables set in an `env` context defined at the workflow level in the caller workflow are not propagated to the called workflow. For more information about the `env` context, see "[Context and expression syntax for GitHub Actions](/actions/reference/context-and-expression-syntax-for-github-actions#env-context)."{% ifversion actions-reusable-workflow-matrix %}{% else %}
8587
* The `strategy` property is not supported in any job that calls a reusable workflow.{% endif %}
8688

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

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,12 @@ A map of the secrets that can be used in the called workflow.
148148

149149
Within the called workflow, you can use the `secrets` context to refer to a secret.
150150

151+
{% note %}
152+
153+
**Note:** If you are passing the secret to a nested reusable workflow, then you must use [`jobs.<job_id>.secrets`](#jobsjob_idsecrets) again to pass the secret. For more information, see "[Reusing workflows](/actions/using-workflows/reusing-workflows#passing-secrets-to-nested-workflows)."
154+
155+
{% endnote %}
156+
151157
If a caller workflow passes a secret that is not specified in the called workflow, this results in an error.
152158

153159
#### Example
@@ -162,14 +168,21 @@ on:
162168
required: false
163169
164170
jobs:
171+
165172
pass-secret-to-action:
166173
runs-on: ubuntu-latest
167-
168174
steps:
175+
# passing the secret to an action
169176
- name: Pass the received secret to an action
170177
uses: ./.github/actions/my-action
171178
with:
172179
token: ${{ secrets.access-token }}
180+
181+
# passing the secret to a nested reusable workflow
182+
pass-secret-to-workflow:
183+
uses: ./.github/workflows/my-workflow
184+
secrets:
185+
token: ${{ secrets.access-token }}
173186
```
174187
{% endraw %}
175188

0 commit comments

Comments
 (0)