Skip to content

Backup

Backup #1143

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Backup
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
workflow_dispatch:
schedule:
# At 04:05 everyday
- cron: '45 4 * * *'
jobs:
user-migration-backupto-s3:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build
run: |
go build
- name: Get GitHub User Data
env:
GITHUB_TOKEN: ${{ secrets.GITBACKUP_TOKEN}}
run: |
./gitbackup -service github -github.createUserMigration -ignore-fork -github.repoType owner
- name: Push 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 ~/.gitbackup/github.com/. s3://gitbackup-echorand/ --recursive --include "*.tar.gz"