Serverside GitHub deployment manager
The goal of gitgrope
is to provide the simplest way known to mankind of getting your repository onto your server, without too many complexities.
It works by polling your GitHub repositories for latest releaases (via tags) and downloading the releases to the server.
That's that. The rest is up to you.
- Create an access token for your private epository. If your repository is public there is no need for an access token.
- Install, configure, and run
gitgrope
on your server as a service. - Expect your releases to be deployed after the amount of polling time configured.
The following example lists all possible configuration fields
access_token: "my_global_token"
log_file: "logs/gitgrope.log" # Log file (default: logs to stdout. Path doesn't need to exist)
release_dir: "test" # where to download files
poll_seconds: 15 # polling timeout (seconds)
http_timeout: 30 # http client timeout (seconds: default 30 seconds)
task_shell: /bin/sh # Shell for running tasks (default is platform dependent)
repos:
- name: "SharkFourSix/gitrope" # Name of repository (required)
grope_everything: true # Download all release assets (default: false)
tasks: # Tasks to run after successfuly downloading assets
- name: info
run: 'echo "Commit hash: $GITHUB_RELEASE_COMMITSH"'
- name: "Unzip"
run: unzip gitgrope_releases.zip
- name: SharkFourSix/gompare
# access_token: # Repository level access token
assets:
- gompare_*linux*.zip # Using glob patterns to match assets
The following environment variables are available to the tasks:
GITHUB_RELEASE_REPO
- RepositoryGITHUB_RELEASE_URL
- Release URLGITHUB_RELEASE_TAG
- Release tagGITHUB_RELEASE_COMMITSH
- Commit hash branch/hashGITHUB_RELEASE_ASSETS
- Contains a semi colon-separated list of release assets, that matched the configured glob.
Specify a configuration file
gitgrope [-config-file optional/path/to/config/file ]
... or run without a configuration file (defaults to .grope.yaml
)
gitgrope