Backup org #7
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: Backup org | |
| on: | |
| workflow_dispatch: | |
| # schedule: | |
| # At 04:05 everyday | |
| # - cron: '45 4 * * *' | |
| jobs: | |
| org-migration-backupto-s3: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download gitbackup binary | |
| run: curl -L -o gitbackup.tar.gz https://github.com/amitsaha/gitbackup/releases/download/v1.1/gitbackup_Linux_x86_64.tar.gz | |
| - name: Extract | |
| run: tar -xzf gitbackup.tar.gz | |
| - name: Make executable | |
| run: chmod +x gitbackup | |
| - name: Run backup | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITBACKUP_TOKEN }} | |
| run: | | |
| ./gitbackup \ | |
| -service github \ | |
| -github.createUserMigration \ | |
| -ignore-fork \ | |
| -github.repoType owner \ | |
| --backupdir /tmp/backup | |
| # - name: Install AWS CLI | |
| # run: | | |
| # apt-get update && apt-get install -y awscli | |
| # | |
| # - name: Upload to S3 | |
| # env: | |
| # AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| # AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_KEY }} | |
| # AWS_DEFAULT_REGION: ap-southeast-2 | |
| # run: | | |
| # aws s3 cp /backup s3://gitbackup-echorand/ --recursive |