Skip to content

Commit 899f794

Browse files
authored
show defined secrets in workflow docs (#23)
1 parent 3b383c7 commit 899f794

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

.internal/ansible/ansible_collections/internal/gha_docs/roles/generate/tasks/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
reference: '{{ file | basename }}'
1818
jobs: '{{ _src.jobs }}'
1919
inputs: '{{ _src[true].workflow_call.inputs | default({}) }}'
20+
secrets: '{{ _src[true].workflow_call.secrets | default({}) }}'
2021
outputs: '{{ _src[true].workflow_call.outputs | default({}) }}'
2122
ansible.builtin.template:
2223
src: workflow.md.j2

.internal/ansible/ansible_collections/internal/gha_docs/roles/generate/templates/workflow.md.j2

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,15 @@
1919

2020
<hr />
2121

22+
### Secrets
23+
| Name (✅required) | Description |
24+
| ----------------- | ----------- |
25+
{% for name, sec in secrets.items() %}
26+
| `{{ name }}`{% if sec.required %}{% endif %} | {{ (sec.description.replace("\n", '<br />')) }} |
27+
{% endfor %}
28+
29+
<hr />
30+
2231
### Outputs
2332
| Name | Description |
2433
| ---- | ----------- |

0 commit comments

Comments
 (0)