Created
September 24, 2026 04:42
-
-
Save noahgcook/370eb8fd810f48de98f8843bcc01de00 to your computer and use it in GitHub Desktop.
Orion Git snapshot schedule (Beta). Source: https://github.com/Gravity-Foundation/orion-examples/blob/main/git-snapshots/orion-export.yml
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: Orion export | |
| on: | |
| schedule: | |
| - cron: "0 6 * * *" | |
| workflow_dispatch: | |
| concurrency: | |
| group: orion-export | |
| cancel-in-progress: false | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| export: | |
| runs-on: ubuntu-latest | |
| env: | |
| ORION_URL: https://your-tenant.runorion.com | |
| ORION_USER: ${{ secrets.ORION_USER }} | |
| ORION_PASSWORD: ${{ secrets.ORION_PASSWORD }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: main | |
| - name: Export and commit | |
| run: | | |
| git config user.name "orion-export" | |
| git config user.email "orion-export@users.noreply.github.com" | |
| git checkout -B orion-export | |
| bash scripts/orion-export.sh | |
| - name: Open a pull request | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| if git diff --quiet origin/main; then | |
| echo "Nothing to review" | |
| exit 0 | |
| fi | |
| git push --force origin orion-export | |
| pr_count=$(gh pr list --base main --head orion-export --state open \ | |
| --json number --jq 'length') | |
| if [ "$pr_count" -eq 0 ]; then | |
| gh pr create --base main --head orion-export \ | |
| --title "Orion snapshot $(date -u +%Y-%m-%d)" \ | |
| --body "Review this exported snapshot. Merging does not update Orion." | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment