Skip to content

Trigger Track Visitors and Generate Summaries #6

Trigger Track Visitors and Generate Summaries

Trigger Track Visitors and Generate Summaries #6

Workflow file for this run

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