File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Backup org
22
33on :
4- workflow_dispatch :
5- # schedule:
6- # At 04:05 everyday
4+ workflow_dispatch :
5+ # schedule:
6+ # At 04:05 everyday
77# - cron: '45 4 * * *'
88
99jobs :
1010 org-migration-backupto-s3 :
1111 runs-on : ubuntu-latest
12+
13+ container :
14+ image : ghcr.io/amitsaha/gitbackup:1.1
15+ credentials :
16+ username : ${{ github.actor }}
17+ password : ${{ secrets.GITHUB_TOKEN }}
18+
19+
1220 steps :
1321 - name : Get GitHub User Data
14- uses : docker://ghcr.io/amitsaha/gitbackup:latest
1522 env :
16- GITHUB_TOKEN : ${{ secrets.GITBACKUP_TOKEN}}
17- with :
18- args : -service github -github.createUserMigration -ignore-fork -github.repoType owner -dir .
19-
20-
21- - name : Push to S3
22- env :
23- AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID}}
24- AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_KEY}}
25- AWS_DEFAULT_REGION : ' ap-southeast-2'
23+ GITHUB_TOKEN : ${{ secrets.GITBACKUP_TOKEN }}
2624 run : |
27- aws s3 cp github.com/. s3://gitbackup-echorand/ --recursive --include "*.tar.gz"
25+ gitbackup \
26+ -service github \
27+ -github.createUserMigration \
28+ -ignore-fork \
29+ -github.repoType owner \
30+ -dir /backup
31+
32+ # - name: Install AWS CLI
33+ # run: |
34+ # apt-get update && apt-get install -y awscli
35+ #
36+ # - name: Upload to S3
37+ # env:
38+ # AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
39+ # AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_KEY }}
40+ # AWS_DEFAULT_REGION: ap-southeast-2
41+ # run: |
42+ # aws s3 cp /backup s3://gitbackup-echorand/ --recursive
You can’t perform that action at this time.
0 commit comments