Skip to content

Commit 6c650fe

Browse files
docs: Documenting GitHub Action
1 parent 1fa5abf commit 6c650fe

File tree

2 files changed

+57
-5
lines changed

2 files changed

+57
-5
lines changed

README.md

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,10 +215,43 @@ For example, here is an example of a pattern comprised of Koch Snowflakes:
215215
We can also animate the pattern, for endless variety:
216216

217217
~~~PowerShell
218-
$turtle = turtle KochSnowflake 10 4 | Set-Turtle -Property PatternTransform -Value @{scale=0.33} | set-turtle -property Fill -value '#4488ff' | Set-Turtle -Property PatternAnimation -Value " <animateTransform attributeName='patternTransform' attributeType='XML' type='scale' values='0.66;0.33;0.66' dur='23s' repeatCount='indefinite' additive='sum' /> <animateTransform attributeName='patternTransform' attributeType='XML' type='rotate' from='0' to='360' dur='41s' repeatCount='indefinite' additive='sum' /> <animateTransform attributeName='patternTransform' attributeType='XML' type='skewX' values='30;-30;30' dur='83s' repeatCount='indefinite' additive='sum' /> <animateTransform attributeName='patternTransform' attributeType='XML' type='skewY' values='30;-30;30' dur='103s' repeatCount='indefinite' additive='sum' /> <animateTransform attributeName='patternTransform' attributeType='XML' type='translate' values='0 0;42 42;0 0' dur='117s' repeatCount='indefinite' additive='sum' /> " $turtle | save-turtle -Path ./EndlessSnowflake.svg -Property Pattern Pop-Location
218+
$turtle = turtle KochSnowflake 10 4 |
219+
Set-Turtle -Property PatternTransform -Value @{scale=0.33} |
220+
set-turtle -property Fill -value '#4488ff' |
221+
Set-Turtle -Property PatternAnimation -Value "
222+
223+
<animateTransform attributeName='patternTransform' attributeType='XML' type='scale' values='0.66;0.33;0.66' dur='23s' repeatCount='indefinite' additive='sum' />
224+
225+
<animateTransform attributeName='patternTransform' attributeType='XML' type='rotate' from='0' to='360' dur='41s' repeatCount='indefinite' additive='sum' />
226+
227+
<animateTransform attributeName='patternTransform' attributeType='XML' type='skewX' values='30;-30;30' dur='83s' repeatCount='indefinite' additive='sum' />
228+
229+
<animateTransform attributeName='patternTransform' attributeType='XML' type='skewY' values='30;-30;30' dur='103s' repeatCount='indefinite' additive='sum' />
230+
231+
<animateTransform attributeName='patternTransform' attributeType='XML' type='translate' values='0 0;42 42;0 0' dur='117s' repeatCount='indefinite' additive='sum' />
232+
233+
"
234+
235+
236+
237+
238+
$turtle | save-turtle -Path ./EndlessSnowflake.svg -Property Pattern
239+
Pop-Location
219240
~~~
220241
<div align='center'>
221242
<img src='./Examples/EndlessSnowflake.svg' alt='Endless Snowflake Pattern' width='100%' />
222243
</div>
223-
![SierpinskiTriangle](./Examples/EndlessSierpinskiTrianglePattern.svg)
244+
245+
### Turtles in a PowerShell Workflow
246+
247+
Turtle has a GitHub action, and can be run in a workflow.
248+
249+
To use the turtle action, simply refer to this repository:
250+
251+
~~~yaml
252+
- name: UseTurtle
253+
uses: StartAutomating/Turtle@main
254+
~~~
255+
256+
This will run any *.turtle.ps1 files found in your repository, and check in any files that have changed.
224257

README.md.ps1

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,8 @@ We can also animate the pattern, for endless variety:
320320
321321
~~~PowerShell
322322
$(
323-
Get-Content ./Examples/EndlessSnowflake.turtle.ps1 |
324-
Select-Object -Skip 1
323+
@(Get-Content ./Examples/EndlessSnowflake.turtle.ps1 |
324+
Select-Object -Skip 1) -join [Environment]::NewLine
325325
)
326326
~~~
327327
"@
@@ -336,9 +336,28 @@ $(
336336

337337

338338

339+
#region Turtle PowerShell GitHub Action
340+
341+
@"
342+
343+
### Turtles in a PowerShell Workflow
344+
345+
Turtle has a GitHub action, and can be run in a workflow.
346+
347+
To use the turtle action, simply refer to this repository:
348+
349+
~~~yaml
350+
- name: UseTurtle
351+
uses: StartAutomating/Turtle@main
352+
~~~
353+
354+
This will run any *.turtle.ps1 files found in your repository, and check in any files that have changed.
355+
"@
356+
357+
#endregion Turtle PowerShell GitHub Action
339358

340359

341-
"![SierpinskiTriangle](./Examples/EndlessSierpinskiTrianglePattern.svg)"
360+
# "![SierpinskiTriangle](./Examples/EndlessSierpinskiTrianglePattern.svg)"
342361

343362

344363
""

0 commit comments

Comments
 (0)