Skip to content

Commit

Permalink
wip: nightly verus snapshot check
Browse files Browse the repository at this point in the history
  • Loading branch information
jaybosamiya committed Mar 7, 2024
1 parent 7f23932 commit 0c5f9c4
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/nightly-snapshot-refresh.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: NightlySnapshotCheck

on:
# Run either manually upon being dispatched by user
workflow_dispatch:
# Or on push to verus-snapshot branch
push:
branches:
- verus-snapshot
# Or on schedule, once every night
# schedule:
# - cron: '0 0 * * *' # Run every night at midnight UTC

jobs:
nightly-check:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Run script and check for changes
id: nightly-check
run: |
cd examples/verus-snapshot
./get_latest.sh
if git diff --exit-code; then
echo "No changes"
echo "changes=false" >> $GITHUB_OUTPUT
else
echo "Changes found"
echo "changes=false" >> $GITHUB_OUTPUT
fi
- name: Report creation of pull request
if: ${{ steps.nightly-check.outputs.changes }}
run: |
echo "Changes found"
# - name: Create Pull Request
# if: ${{ steps.nightly-check.outputs.changes }}
# uses: peter-evans/create-pull-request@v6
# with:
# commit-message: "Update to latest Verus snapshot"
# title: "Verus snapshot update"
# body: "Automated nightly update by GitHub Actions."
# branch: nightly-update
# base: main

0 comments on commit 0c5f9c4

Please sign in to comment.