This repository has been archived by the owner on Oct 2, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from scriptershub/main
Beta
- Loading branch information
Showing
2 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Hourly Greeting Automation | ||
|
||
on: | ||
schedule: | ||
- cron: '0 * * * *' # Runs at the start of every hour | ||
|
||
jobs: | ||
greet: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Start up | ||
run: echo "Starting up the greeting automation..." | ||
|
||
- name: Print greeting | ||
run: | | ||
echo "Hello, world! The time is $(date)" | ||
echo "Have a great hour ahead!" | ||
- name: Go offline | ||
run: echo "Going offline. See you in an hour!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Scheduled and Manual Workflow | ||
|
||
# Controls when the action will run | ||
on: | ||
# Manually triggered using the UI or API | ||
workflow_dispatch: | ||
inputs: | ||
name: | ||
description: 'Person to greet' | ||
default: 'World' | ||
required: true | ||
type: string | ||
|
||
# Automatically triggered every hour | ||
schedule: | ||
- cron: '0 * * * *' | ||
|
||
jobs: | ||
greet: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Send greeting | ||
run: echo "Hello ${{ inputs.name }}" | ||
|
||
- name: Print hello every hour | ||
run: echo "Hello, this is a scheduled greeting!" | ||
|
||
- name: Stop this type every hour | ||
if: github.event_name == 'schedule' | ||
run: echo "Stopping after scheduled run" |