This commit is contained in:
13
.github/workflows/backup.yml
vendored
13
.github/workflows/backup.yml
vendored
@@ -1,4 +1,4 @@
|
||||
name: Nomad Backup
|
||||
name: Infrastructure Backup
|
||||
|
||||
on:
|
||||
schedule:
|
||||
@@ -34,10 +34,17 @@ jobs:
|
||||
run: |
|
||||
python backup.py --output nomad_backup
|
||||
|
||||
- name: Run Consul backup
|
||||
env:
|
||||
CONSUL_HTTP_ADDR: ${{ secrets.CONSUL_HTTP_ADDR }}
|
||||
CONSUL_HTTP_TOKEN: ${{ secrets.CONSUL_HTTP_TOKEN }}
|
||||
run: |
|
||||
python consul_backup.py --output consul_backup
|
||||
|
||||
- name: Check for changes
|
||||
id: check_changes
|
||||
run: |
|
||||
git add nomad_backup/
|
||||
git add nomad_backup/ consul_backup/
|
||||
if git diff --staged --quiet; then
|
||||
echo "changes=false" >> $GITHUB_OUTPUT
|
||||
echo "No changes to commit"
|
||||
@@ -51,5 +58,5 @@ jobs:
|
||||
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 commit -m "chore: backup infrastructure configurations [skip ci]"
|
||||
git push
|
||||
Reference in New Issue
Block a user