Scheduled: Merge nightly #10
This file contains hidden or 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: "Scheduled: Merge nightly" | |
| on: | |
| # Daily at 2 AM | |
| schedule: | |
| - cron: "0 2 * * *" | |
| timezone: "America/Denver" | |
| # Allow manual trigger | |
| workflow_dispatch: | |
| jobs: | |
| merge-scheduled-to-nightly: | |
| name: Merge scheduled to nightly | |
| runs-on: ubuntu-slim | |
| environment: ${{ github.event_name == 'workflow_dispatch' && 'scheduled-merges' || '' }} | |
| env: | |
| SOURCE_BRANCH: scheduled | |
| TARGET_BRANCH: nightly | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| ref: ${{ env.TARGET_BRANCH }} | |
| fetch-depth: 0 | |
| token: ${{ secrets.MOOSEBUILD_GIT_WRITE }} | |
| - name: Merge | |
| run: | | |
| git fetch origin "$SOURCE_BRANCH" | |
| git merge --ff-only "origin/${SOURCE_BRANCH}" | |
| git push origin "$TARGET_BRANCH" |