Skip to content

Commit

Permalink
feat: updated docs, added multi arch docker images
Browse files Browse the repository at this point in the history
  • Loading branch information
DeluxeOwl committed Aug 7, 2022
1 parent bd56f3e commit b15a348
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ If they already exist, it calls `git pull` instead.
- you will need a Github PAT (personal access token) with scope `repo` and `user`.
- [creating a github PAT](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)

# Installation

- if you have go installed: `go install github.com/DeluxeOwl/gh-stars-backup@latest`
- install the binary for your OS from the [github releases tab](https://github.com/DeluxeOwl/gh-stars-backup/releases).

# Usage

```sh
Expand All @@ -39,13 +44,9 @@ Usage of gh-stars-backup:
```

It also takes the flags as environment variables if available, transform the flags to uppercase (ex: `CLONE_ARGS`)
example usage:

## As a binary

You can install the binary for your OS from the [github releases tab](https://github.com/DeluxeOwl/gh-stars-backup/releases).


```sh
./gh-stars-backup -gh-pat=<your_pat_token> -clone-args="--depth 1" -dir-format="{{.RepoName}}_{{.RepoAuthor}}" -output-dir="./ghbackup" | tee out.txt
# or with an env variable only
Expand All @@ -56,8 +57,6 @@ GH_PAT=<my_pat_token> ./gh-stars-backup

## As a docker image

**note:** only for x86

```sh
docker build -t gh-stars-backup .

Expand Down Expand Up @@ -98,3 +97,7 @@ spec:
value: <your_pat_token>
restartPolicy: OnFailure
```
# Development
I use [taskfile](https://taskfile.dev/) as a glorified command runner.
5 changes: 5 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,8 @@ tasks:
build-docker:
cmds:
- docker build -t gh-stars-backup .
init-multi-arch:
cmds:
- docker buildx create --name multi-arch --use
build-multi-arch:
cmds: docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t gh-stars-backup .

0 comments on commit b15a348

Please sign in to comment.