-
Notifications
You must be signed in to change notification settings - Fork 1
72 lines (63 loc) · 2.15 KB
/
_generate_doc.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Generate Workflow doc
on:
push:
# workflow_dispatch:
# inputs:
# filename:
# description: "Workflow ou action name"
# type: string
# required: false
# default: ".github/workflows/workflow.yaml"
# file-type:
# description: "Type of the file."
# type: choice
# required: true
# default: patch
# options:
# - action
# - workflow
# output-file:
# description: "File name of the documentation to be generated"
# type: string
# # required: true
# default: ".github/workflows/TESTDOC.md"
jobs:
workflow-doc:
name: Generate workflow documentation
runs-on: ubuntu-22.04
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
fetch-depth: 0
# - name: Install CLI
# shell: bash
# run: go get -u github.com/tj-actions/auto-doc/v3
- name: Generates docs
shell: bash
run: |
# actions
# for actionsubdir in actions/ ; do
# actionfilename=$actionsubdir/action.yaml
# outputdocfile="docs/references/$actionsubdir"
# echo "# Refenrences $actionsubdir" > $actionfilename
# echo "## Inputs" >> $actionfilename
# echo "## Outputs" >> $actionfilename
# auto-doc -f actionfilename --colMaxWidth 10000 --colMaxWords 2000 -o $outputdocfile
# done
# docname="$(echo $workflowname | cut -d'.' -f1)"
# workflows
for workflows in .github/workflows ; do
if [[ "$worklows" != "_*" && "$worklows" != "README"; then
echo "$worklows"
fi
done
- name: Commit and push
uses: bakdata/ci-templates/actions/[email protected]
with:
add-untracked: "true"
pass-empty-commit: "true"
commit-message: "Committing all the awesome changes in my repository!"
github-email: "${{ secrets.GH_EMAIL }}"
github-username: "${{ secrets.GH_USERNAME }}"
github-token: "${{ secrets.GH_TOKEN }}"