Skip to content

Commit

Permalink
Update backup.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
mgz0227 authored May 3, 2024
1 parent 0fdf3ee commit 8493a75
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/backup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ jobs:
- name: Configure Git
run: |
git config --local user.email "miaogongzi0227@gmail.com"
git config --local user.name "mgz0227"
git config --global user.email "actions@github.com"
git config --global user.name "GitHub Actions"
- name: Add Backup Branch
run: |
Expand All @@ -36,9 +36,10 @@ jobs:
mv main_backup_${BACKUP_DATETIME}.tar.gz backups/
git add -A
git commit -m "Auto backup main branch code"
git push origin backup
env:
GH_TOKEN: ${{ secrets.HARMONY_BACKUP }}

- name: Switch Back to Main Branch
run: git checkout main
- name: GitHub Push Backup Branch
uses: ad-m/github-push-action@v0.6.0
with:
github_token: ${{ secrets.HARMONY_BACKUP }}
branch: backup
force: true

0 comments on commit 8493a75

Please sign in to comment.