-
Notifications
You must be signed in to change notification settings - Fork 0
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 #67 from brown9804/visitors-count
Visitors count
- Loading branch information
Showing
2 changed files
with
40 additions
and
8 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
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,38 @@ | ||
name: Trigger Track Visitors and Generate Summaries | ||
|
||
on: | ||
schedule: | ||
- cron: '*/10 * * * *' # Runs every 10 minutes | ||
workflow_dispatch: | ||
inputs: | ||
runs: | ||
description: 'Runs' | ||
type: number | ||
default: 1 | ||
required: false | ||
|
||
jobs: | ||
trigger: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up GitHub CLI | ||
run: | | ||
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key C99B11DEB97541F0 | ||
sudo apt-add-repository https://cli.github.com/packages | ||
sudo apt update | ||
sudo apt install gh | ||
- name: Authenticate GitHub CLI | ||
run: gh auth login --with-token <<< "${{ secrets.GITHUB_TOKEN }}" | ||
|
||
- name: Trigger Callee Workflow | ||
env: | ||
RUNS: ${{ inputs.runs }} | ||
run: | | ||
for (( i=0; i<RUNS; i++ )); do | ||
gh workflow run --repo "$GITHUB_REPOSITORY" Track Visitors and Generate Summaries | ||
sleep 600 # Sleep for 10 minutes | ||
done |