•  


Backup Github to AWS S3 · Actions · GitHub Marketplace · GitHub
Skip to content
package

GitHub Action

Backup Github to AWS S3

v1.0.0 Latest version

Backup Github to AWS S3

package

Backup Github to AWS S3

A GitHub Action to backup GitHub repositories to Amazon S3

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Backup Github to AWS S3

uses: derek-palmer/backup-github-to-s3@v1.0.0

Learn more about this action in derek-palmer/backup-github-to-s3

Choose a version

Github Backup to S3 Action

This action backs up GitHub repositories to an Amazon S3 bucket.

Inputs

GH_TOKEN

Required GitHub token (Personal Access Token with repo scope to access private repositories).

AWS_ACCESS_KEY_ID

Required AWS Access Key ID.

AWS_SECRET_ACCESS_KEY

Required AWS Secret Access Key.

AWS_DEFAULT_REGION

Required AWS Region.

S3_BUCKET

Required S3 bucket name.

GH_ORG_NAME

GitHub organization name (optional). Provide this to back up an organization's repositories. If not provided, the action will back up repositories for the user associated with the provided GitHub token.

Setup

Step 1: Generate a GitHub Personal Access Token

  1. Go to your GitHub account settings.
  2. Navigate to "Developer settings" > "Personal access tokens".
  3. Generate a new token with the repo scope.
  4. Copy the token.

Step 2: Add Secrets to Your Repository

  1. Go to your repository's settings.
  2. Navigate to "Secrets and variables" > "Actions".
  3. Add the following secrets:
    • GH_TOKEN : The GitHub Personal Access Token generated in Step 1.
    • AWS_ACCESS_KEY_ID : Your AWS Access Key ID.
    • AWS_SECRET_ACCESS_KEY : Your AWS Secret Access Key.
    • AWS_DEFAULT_REGION : Your AWS region.
    • S3_BUCKET : The name of your S3 bucket.
    • GH_ORG_NAME : (Optional) The GitHub organization name if you are backing up an organization's repositories.

Example Workflow

Create a workflow file in your repository (e.g., .github/workflows/backup.yml ) with the following content:

name
: 
Backup GitHub Repos to S3


on
:
  
schedule
:
    - 
cron
: 
'
0 2 * * *
'
 #
 Runs every day at 2 AM UTC

  workflow_dispatch
: 
#
 Allows manual triggering of the workflow


jobs
:
  
backup
:
    
runs-on
: 
ubuntu-latest


    steps
:
      - 
name
: 
Checkout repository

        uses
: 
actions/checkout@v4


      - 
name
: 
Run backup action

        uses
: 
your-username/backup-to-s3-action@v1.0.0

        with
:
          
GH_TOKEN
: 
${{ secrets.GH_TOKEN }} 
#
 Ensure this is the correct PAT with `repo` scope

          AWS_ACCESS_KEY_ID
: 
${{ secrets.AWS_ACCESS_KEY_ID }}

          AWS_SECRET_ACCESS_KEY
: 
${{ secrets.AWS_SECRET_ACCESS_KEY }}

          AWS_DEFAULT_REGION
: 
${{ secrets.AWS_DEFAULT_REGION }}

          S3_BUCKET
: 
${{ secrets.S3_BUCKET }}

          GH_ORG_NAME
: 
${{ secrets.GH_ORG_NAME }} 
#
 Only required if backing up an organization's repositories
- "漢字路" 한글한자자동변환 서비스는 교육부 고전문헌국역지원사업의 지원으로 구축되었습니다.
- "漢字路" 한글한자자동변환 서비스는 전통문화연구회 "울산대학교한국어처리연구실 옥철영(IT융합전공)교수팀"에서 개발한 한글한자자동변환기를 바탕하여 지속적으로 공동 연구 개발하고 있는 서비스입니다.
- 현재 고유명사(인명, 지명등)을 비롯한 여러 변환오류가 있으며 이를 해결하고자 많은 연구 개발을 진행하고자 하고 있습니다. 이를 인지하시고 다른 곳에서 인용시 한자 변환 결과를 한번 더 검토하시고 사용해 주시기 바랍니다.
- 변환오류 및 건의,문의사항은 juntong@juntong.or.kr로 메일로 보내주시면 감사하겠습니다. .
Copyright ⓒ 2020 By '전통문화연구회(傳統文化硏究會)' All Rights reserved.
 한국   대만   중국   일본