Trigger Nightly Rebuild of origin/master #1299
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: Trigger Nightly Rebuild of origin/master | |
on: | |
schedule: | |
- cron: '0 1 * * 1,2,3,4,5' | |
# Push trigger is only for test purposes | |
# push: | |
# branches-ignore: | |
# - master | |
jobs: | |
trigger_nightly_rebuild: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: 'recursive' | |
- name: Get Time | |
id: time | |
run: echo "::set-output name=time::$(date -u '+%Y_%m_%d_%H_%M_%S')" | |
- name: Create new empty commit | |
run: | | |
git checkout -b rebuild/nightly_${{ steps.time.outputs.time }} | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git commit --allow-empty -m 'nightly_${{ steps.time.outputs.time }}' | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: rebuild/nightly_${{ steps.time.outputs.time }} |