https://github.com/mjpitz/github-release-backup
Backup GitHub release artifacts to an S3 compatible backend
https://github.com/mjpitz/github-release-backup
Last synced: about 1 year ago
JSON representation
Backup GitHub release artifacts to an S3 compatible backend
- Host: GitHub
- URL: https://github.com/mjpitz/github-release-backup
- Owner: mjpitz
- License: mit
- Created: 2021-07-07T03:26:01.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-07-07T09:28:43.000Z (about 5 years ago)
- Last Synced: 2025-02-12T12:17:25.916Z (over 1 year ago)
- Language: Go
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# github-release-backup
A minimal tool that backs up GitHub release assets to an S3 compatible backend.
By default, GitHub actions will only host artifacts for a maximum of 90 days.
This tool can be used to perform a one-time backup of all release assets.
## Installation
```shell script
go get github.com/mjpitz/github-release-backup
```
## Usage
```shell script
# github configuration
export GITHUB_OWNER="depscloud"
export GITHUB_REPO="depscloud"
export GITHUB_ACCESS_TOKEN="github_access_token"
# s3 configuration
export S3_ENDPOINT="sfo2.digitaloceanspaces.com" # configure the s3 endpoint
export S3_DISABLE_SSL="" # set to non-empty value to disable tls
export AWS_DEFAULT_REGION="region"
export AWS_ACCESS_KEY_ID="aws_access_key_id"
export AWS_SECRET_ACCESS_KEY="aws_secret_access_key"
export S3_BUCKET_NAME="bucket_name"
# configure existing asset behavior
export ON_EXISTING_ASSET="halt" # stop when we encounter an asset that already exists
export ON_EXISTING_ASSET="overwrite" # overwrite assets that already exist
export ON_EXISTING_ASSET="" # skip assets that already exist
# run the script
github-release-backup
```