Skip to content

Commit 17b34e1

Browse files
author
Martin Lopes
authored
Revert "actions-inherit-secrets-reusable-workflows
1 parent 5ffcd4d commit 17b34e1

File tree

4 files changed

+1
-66
lines changed

4 files changed

+1
-66
lines changed

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

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,8 @@ You can define inputs and secrets, which can be passed from the caller workflow
103103
required: true
104104
```
105105
{% endraw %}
106-
{% if actions-inherit-secrets-reusable-workflows %}
107-
For details of the syntax for defining inputs and secrets, see [`on.workflow_call.inputs`](/actions/reference/workflow-syntax-for-github-actions#onworkflow_callinputs), [`on.workflow_call.secrets`](/actions/reference/workflow-syntax-for-github-actions#onworkflow_callsecrets) and [`on.workflow_call.secrets.inherit`](/actions/using-workflows/workflow-syntax-for-github-actions#onworkflow_callsecretsinherit).
108-
1. In the reusable workflow, reference the input or secret that you defined in the `on` key in the previous step. If the secrets are inherited using `secrets: inherit`, you can reference them even if they are not defined in the `on` key.
109-
{%else%}
110106
For details of the syntax for defining inputs and secrets, see [`on.workflow_call.inputs`](/actions/reference/workflow-syntax-for-github-actions#onworkflow_callinputs) and [`on.workflow_call.secrets`](/actions/reference/workflow-syntax-for-github-actions#onworkflow_callsecrets).
111-
1. In the reusable workflow, reference the input or secret that you defined in the `on` key in the previous step.
112-
{%endif%}
107+
1. In the reusable workflow, reference the input or secret that you defined in the `on` key in the previous step.
113108

114109
{% raw %}
115110
```yaml
@@ -194,7 +189,6 @@ When you call a reusable workflow, you can only use the following keywords in th
194189
* [`jobs.<job_id>.with.<input_id>`](/actions/reference/workflow-syntax-for-github-actions#jobsjob_idwithinput_id)
195190
* [`jobs.<job_id>.secrets`](/actions/reference/workflow-syntax-for-github-actions#jobsjob_idsecrets)
196191
* [`jobs.<job_id>.secrets.<secret_id>`](/actions/reference/workflow-syntax-for-github-actions#jobsjob_idsecretssecret_id)
197-
{% if actions-inherit-secrets-reusable-workflows %}* [`jobs.<job_id>.secrets.inherit`](/actions/using-workflows/workflow-syntax-for-github-actions#onworkflow_callsecretsinherit){% endif %}
198192
* [`jobs.<job_id>.needs`](/actions/reference/workflow-syntax-for-github-actions#jobsjob_idneeds)
199193
* [`jobs.<job_id>.if`](/actions/reference/workflow-syntax-for-github-actions#jobsjob_idif)
200194
* [`jobs.<job_id>.permissions`](/actions/reference/workflow-syntax-for-github-actions#jobsjob_idpermissions)

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

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -157,42 +157,6 @@ jobs:
157157
```
158158
{% endraw %}
159159

160-
{% if actions-inherit-secrets-reusable-workflows %}
161-
162-
#### `on.workflow_call.secrets.inherit`
163-
164-
Use the `inherit` keyword to pass all the calling workflow's secrets to the called workflow. This includes all secrets the calling workflow has access to, namely organization, repository, and environment secrets. The `inherit` keyword can be used to pass secrets across repositories within the same organization, or across organizations within the same enterprise.
165-
166-
#### Example
167-
168-
{% raw %}
169-
170-
```yaml
171-
on:
172-
workflow_dispatch:
173-
174-
jobs:
175-
pass-secrets-to-workflow:
176-
uses: ./.github/workflows/called-workflow.yml
177-
secrets: inherit
178-
```
179-
180-
```yaml
181-
on:
182-
workflow_call:
183-
184-
jobs:
185-
pass-secret-to-action:
186-
runs-on: ubuntu-latest
187-
steps:
188-
- name: Use a repo or org secret from the calling workflow.
189-
uses: echo ${{ secrets.CALLING_WORKFLOW_SECRET }}
190-
```
191-
192-
{% endraw %}
193-
194-
{%endif%}
195-
196160
#### `on.workflow_call.secrets.<secret_id>`
197161

198162
A string identifier to associate with the secret.

data/features/actions-inherit-secrets-reusable-workflows.yml

Lines changed: 0 additions & 7 deletions
This file was deleted.

data/reusables/actions/pass-inputs-to-reusable-workflows.md

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,3 @@ jobs:
1111
envPAT: ${{ secrets.envPAT }}
1212
```
1313
{% endraw %}
14-
15-
{% if actions-inherit-secrets-reusable-workflows %}
16-
Workflows that call reusable workflows in the same organization or enterprise can use the `inherit` keyword to implicitly pass the secrets.
17-
18-
{% raw %}
19-
```yaml
20-
jobs:
21-
call-workflow-passing-data:
22-
uses: octo-org/example-repo/.github/workflows/reusable-workflow.yml@main
23-
with:
24-
username: mona
25-
secrets: inherit
26-
```
27-
{% endraw %}
28-
29-
{%endif%}

0 commit comments

Comments
 (0)