Skip to content

Daily Trigger

Daily Trigger #763

name: Daily Trigger
on:
# New changes will trigger LayerCi automatically.
# No need to trigger again with github action.
# push:
workflow_dispatch:
schedule:
- cron: "30 2 * * *"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: trigger LayerCI to build
env:
GH_REPO: ${{ github.repository }}
TOKEN: ${{ secrets.LAYERCI }}
run: |
REPO_NAME=${GH_REPO#*/}
curl -X POST \
-H 'Content-Type: application/json' \
-d '{"branch": "main"}' \
"https://layerci.com/api/v1/run/${REPO_NAME}?layertoken=${TOKEN}"