first commit

This commit is contained in:
2025-11-21 13:07:40 -08:00
parent d9d1933934
commit fe8d4976ed
137 changed files with 23869 additions and 0 deletions

55
.github/workflows/backup.yml vendored Normal file
View File

@@ -0,0 +1,55 @@
name: Nomad Backup
on:
schedule:
# Run daily at 2 AM UTC (6 PM PST)
- cron: '0 2 * * *'
workflow_dispatch: # Allow manual triggering
jobs:
backup:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
# Fetch all history so we can properly commit changes
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests
- name: Run Nomad backup
env:
NOMAD_ADDR: ${{ secrets.NOMAD_ADDR }}
NOMAD_TOKEN: ${{ secrets.NOMAD_TOKEN }}
run: |
python backup.py --output nomad_backup
- name: Check for changes
id: check_changes
run: |
git add nomad_backup/
if git diff --staged --quiet; then
echo "changes=false" >> $GITHUB_OUTPUT
echo "No changes to commit"
else
echo "changes=true" >> $GITHUB_OUTPUT
echo "Changes detected, will commit"
fi
- name: Commit and push changes
if: steps.check_changes.outputs.changes == 'true'
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -m "chore: backup Nomad jobs [skip ci]"
git push