/docker-python-github-backup

Docker image for https://github.com/josegonzalez/python-github-backup

Primary LanguageDockerfile

Multi-arch Docker image for python-github-backup

GitHub tag (latest by date) Docker Image Version (latest semver) Docker Image (latest) CI Docker Image (release) CI

Source code repo: josegonzalez/python-github-backup

How to release

  • Create & push a new tag to repo :)

Usage

docker run --rm -e GITHUB_USERNAME=maxromanovsky -e GITHUB_TOKEN=gh_token -e GITHUB_USER_TO_BACKUP=maxromanovsky -v "/Users/max/Downloads/gh:/out" maxromanovsky/python-github-backup:latest

Configuration

Environment variable name Description Defaults
GITHUB_USERNAME Github username for auth
GITHUB_TOKEN Personal access token for auth
GITHUB_USER_TO_BACKUP Github user whose repositories should be backed up
BACKUP_OPTIONS github-backup options --repositories --gists -P -F --bare
DIR_DESTINATION Backup destination directory /out

Building locally

Using docker buildx

export GITHUB_BACKUP_VERSION=0.33.0
docker buildx build --platform linux/amd64,linux/arm/v7 --build-arg VERSION=$GITHUB_BACKUP_VERSION -t maxromanovsky/python-github-backup:v${GITHUB_BACKUP_VERSION} --push .

Using Github Actions

brew install nektos/tap/act
act -P ubuntu-latest=phaze9/action-runner -s DOCKER_USERNAME=maxromanovsky -s DOCKER_PASSWORD=docker-personal-access-token

Repository secrets

  • DOCKER_PASSWORD
  • DOCKER_USERNAME
  • SLACK_WEBHOOK