Skip to content

Nightly trigger

Nightly trigger #1668

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@v3
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 "madlab-bot@ja2-stracciatella.github.io"
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 }}