Skip to content

Commit 0492eea

Browse files
Adding example of schedule based trigger
1 parent 5492e77 commit 0492eea

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
2+
name: Trace On the Hour
3+
on:
4+
schedule:
5+
cron:
6+
- '0 0-23 * * *'
7+
jobs:
8+
TraceGitHubEvent:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: TraceGitHubEvent
12+
id: TraceGitHubEvent
13+
shell: pwsh
14+
run: |
15+
# Traces the GitHub Event
16+
$gitHubEvent = if ($env:GITHUB_EVENT_PATH) {
17+
[IO.File]::ReadAllText($env:GITHUB_EVENT_PATH) | ConvertFrom-Json
18+
} else { $null }
19+
20+
@"
21+
$($gitHubEvent | ConvertTo-Json -Depth 100)
22+
"@ | Out-Host
23+
24+

0 commit comments

Comments
 (0)