GitHub Backup Action Utilities

chyroc

chyroc

Posted on March 1, 2022

GitHub Backup Action Utilities

Hi, good morning everyone.

I want to introduce a tool based on GitHub Action to backup GitHub data to DropBox.

As an engineer, GitHub is the software we use frequently, and the information stored on GitHub is an important asset for us as engineers. To back up this data, I developed this tool.

The address of the tool is: https://github.com/chyroc/github2dropbox.

This tool can back up a variety of GitHub data, including:

  • Star
  • Follower
  • Following
  • Repo
  • Issue
  • Issue Comment
  • Gist
  • .git

Very simple to use:

add file: .github/workflows/github-backup.yml to your project

name: github-backup

on:
  push:
    branches: [ master ] # trigger on pushes to master
  pull_request: # trigger on pull requests

jobs:

  run:
    runs-on: ubuntu-latest
    timeout-minutes: 60 # timeout after 60 minutes
    steps:
      - name: Backup
        uses: chyroc/github2dropbox@v0.2.0
        with:
          DROPBOX_TOKEN: ${{ secrets.DROPBOX_TOKEN }} # dropbox token
          GITHUB_TOKEN: ${{ secrets.G_TOKEN }} # github token
          ENABLE_REPO: true # enable repo backup
          ENABLE_STAR: true # enable star backup
          ENABLE_FOLLOWER: true # enable follower backup
          ENABLE_FOLLOWING: true # enable following backup
          ENABLE_GIST: true # enable gist backup
          ENABLE_ISSUE: true # enable issue backup(need ENABLE_REPO=true)
          ENABLE_ISSUE_COMMENT: true # enable issue comment backup(need ENABLE_REPO=true)
          ENABLE_REPO_GIT: true # enable repo .git folder backup(need ENABLE_REPO=true)
Enter fullscreen mode Exit fullscreen mode

When GitHub Action runs, the tool will use the GitHub Access Token you configured to access the GitHub API, store it as a zip, json, etc. file, and upload it to DropBox.

💖 💪 🙅 🚩
chyroc
chyroc

Posted on March 1, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

What was your win this week?
weeklyretro What was your win this week?

November 29, 2024

Where GitOps Meets ClickOps
devops Where GitOps Meets ClickOps

November 29, 2024

How to Use KitOps with MLflow
beginners How to Use KitOps with MLflow

November 29, 2024

Modern C++ for LeetCode 🧑‍💻🚀
leetcode Modern C++ for LeetCode 🧑‍💻🚀

November 29, 2024