@@ -52,6 +52,14 @@ The maximum number of nested folders to show files within. A higher number will
52
52
53
53
Default: 9
54
54
55
+ ## ` push `
56
+
57
+ Whether to make a new commit with the diagram and push it to the original repository.
58
+
59
+ Should be a boolean value, i.e. ` true ` or ` false ` . See ` commit_message ` and ` branch ` for how to customise the commit.
60
+
61
+ Default: ` false `
62
+
55
63
## ` commit_message `
56
64
57
65
The commit message to use when updating the diagram. Useful for skipping CI. For example: ` Updating diagram [skip ci] `
@@ -64,6 +72,14 @@ The branch name to push the diagram to (branch will be created if it does not ye
64
72
65
73
For example: ` diagram `
66
74
75
+ ## ` artifact_name `
76
+
77
+ The name of an [ artifact] ( https://docs.github.com/en/actions/guides/storing-workflow-data-as-artifacts ) to create containing the diagram.
78
+
79
+ If unspecified, no artifact will be created.
80
+
81
+ Default: ` '' ` (no artifact)
82
+
67
83
## Example usage
68
84
69
85
You'll need to run the ` actions/checkout ` Action beforehand, to check out the code.
@@ -77,3 +93,30 @@ You'll need to run the `actions/checkout` Action beforehand, to check out the co
77
93
output_file : " images/diagram.svg"
78
94
excluded_paths : " dist,node_modules"
79
95
` ` `
96
+
97
+
98
+ ## Accessing the diagram
99
+
100
+ By default, this action will create a new commit with the diagram on the specified branch.
101
+
102
+ If you want to avoid new commits, you can create an artifact to accompany the workflow run,
103
+ by specifying an ` artifact_name`. You can then download the diagram using the
104
+ [`actions/download-artifact`](https://github.com/marketplace/actions/download-a-build-artifact)
105
+ action from a later step in your workflow,
106
+ or by using the [GitHub API](https://docs.github.com/en/rest/reference/actions#artifacts).
107
+
108
+ Example :
109
+ ` ` ` yaml
110
+ - name: Update diagram
111
+ uses: githubocto/[email protected]
112
+ with:
113
+ output_file: "images/diagram.svg"
114
+ artifact_name: my-diagram
115
+ - name: Get artifact
116
+ uses: actions/download-artifact@v2
117
+ with:
118
+ name: my-diagram
119
+ path: downloads
120
+ # Diagram now available at downloads/images/diagram.svg
121
+ ` ` `
122
+ Note that this will still also create a commit, unless you specify `push : false`!
0 commit comments