🤖 Cron bot walking #8
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
name: Cron bot | |
run-name: 🤖 Cron bot walking | |
on: | |
schedule: | |
# Cron at midnight GMT+7 | |
- cron: '0 17 * * *' | |
- cron: '5 17 * * *' | |
- cron: '10 17 * * *' | |
jobs: | |
trigger-portal-document: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/github-script@v6 | |
name: Trigger build Portal Documentation for master | |
if: github.event.schedule == '0 17 * * *' | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
script: | | |
await github.rest.actions.createWorkflowDispatch({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
workflow_id: 'portal-documentation.yml', | |
ref: 'master' | |
}) | |
- uses: actions/github-script@v6 | |
name: Trigger build Portal Documentation for release/10.0 | |
if: github.event.schedule == '5 17 * * *' | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
script: | | |
await github.rest.actions.createWorkflowDispatch({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
workflow_id: 'portal-documentation.yml', | |
ref: 'release/10.0' | |
}) | |
- uses: actions/github-script@v6 | |
name: Trigger build Portal Documentation for release/12.0 | |
if: github.event.schedule == '10 17 * * *' | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
script: | | |
await github.rest.actions.createWorkflowDispatch({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
workflow_id: 'portal-documentation.yml', | |
ref: 'release/12.0' | |
}) | |