Skip to content

Nightly trigger

Nightly trigger #1874

Workflow file for this run

name: Nightly trigger
on:
schedule:
- cron: '0 2 * * *'
env:
NIGHTLY: nightly
TRUNK: master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout nightly
uses: actions/checkout@v4
with:
ref: ${{ env.NIGHTLY }}
fetch-depth: 0
persist-credentials: false
- name: Update nightly
run: |
# user and email are required for pushing
git config --local user.email "[email protected]"
git config --local user.name "Madlab's bot"
# fast forward to current master
git fetch origin ${TRUNK}
git merge origin/${TRUNK} --ff-only
- name: Push nightly
run: |
# push new commits to nightly
REMOTE="https://${BOT_USERNAME}:${BOT_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
git push "${REMOTE}" "HEAD:${NIGHTLY}"
env:
BOT_USERNAME: madlab-bot
BOT_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}