Skip to content

Nightly Build

Nightly Build #986

Workflow file for this run

name: Nightly Build
on:
schedule:
- cron: "0 */12 * * *"
jobs:
check_changes:
name: Check changes to src
runs-on: 'ubuntu-20.04'
# Declare outputs for next jobs
outputs:
src_changed: ${{ steps.check_file_changed.outputs.src_changed }}
steps:
- uses: actions/checkout@v2
with:
# Checkout as many commits as needed for the diff
fetch-depth: 2
- shell: pwsh # the example this is adopted from makes use of PowerShell
id: check_file_changed
run: |
# diff HEAD W/ previous commit
$diff = git diff --name-only HEAD^ HEAD
$HasDiff = $SourceDiff.Length -gt 0
Write-Host "::set-output name=src_changed::$HasDiff"
merge:
needs: [ check_changes ]
if: needs.check_changes.outputs.tests_changed == 'True'
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.gpmp_BOT_ACCT }}
- name: Merge with main
run: |
git config user.name "gpmp-bot"
git config user.email "[email protected]"
git switch main
git merge --squash origin/rolling
git commit -m "#NIGHTLY: Merging rolling -> main"
git push