Categorygithub.com/NERVEbing/release-downloader
repositorypackage
0.0.0-20240531035240-4ede8df83797
Repository: https://github.com/nervebing/release-downloader.git
Documentation: pkg.go.dev

# README

release-downloader

Last Commit Build Docker Images Go Report Card License

English | 简体中文

Overview

release-downloader is an elegantly practical application designed to periodically monitor specified GitHub repositories for releases and download corresponding files according to predefined criteria. It is primarily used to automate the acquisition of the latest software release versions.

Features

  • Periodically monitors GitHub repositories for new releases.
  • Supports matching based on release or tag names.
  • Allows file name-based matching.
  • Offers custom download paths.
  • Automatically extracts files (supports zip, gz, and tar.gz).
  • Developed in Go, ensuring simplicity and ease of use.

Usage

Docker Compose (Recommended)

mkdir release-downloader && cd release-downloader
wget https://raw.githubusercontent.com/NERVEbing/release-downloader/master/docker-compose.yml
# Edit docker-compose.yml file
docker compose up -d

See docker-compose.yml

Build from source

git clone https://github.com/NERVEbing/release-downloader.git && cd release-downloader
go build -o release-downloader .
./release-downloader \
    -repository "containers/podman" \
    -filename ".*linux_amd64.tar.gz$" \
    -latest \
    -prerelease \
    -path ./tmp \
    -interval 1h \
    -now

Environment & Command line arguments

Command Line FlagEnvironment VariableDescriptionDefault Value
-repositoryRD_REPOSITORYGitHub repository in {owner}/{repo} format.""
-tagRD_TAGOptional. Download assets from a specific tag (e.g., regexp '..18.').""
-filenameRD_FILENAMEOptional. Download assets matching a specific filename, excluding tarball or zipball (e.g., '.linux-arm64..gz').""
-latestRD_LATESTOptional. Download the latest release.false
-prereleaseRD_PRERELEASEOptional. Download prerelease versions.false
-tokenRD_TOKENOptional. GitHub personal access token.""
-pathRD_PATHOptional. Download path."./tmp"
-intervalRD_INTERVALOptional. Interval between download tasks.1h
-nowRD_NOWOptional. Run the task immediately.false
-timeoutRD_TIMEOUTOptional. HTTP client timeout duration.30s
-asset_tagRD_ASSET_TAGOptional. Rename the file using the asset tag (e.g., xxx.zip -> xxx-v0.5.1.zip).false
-asset_dateRD_ASSET_DATEOptional. Rename the file using the asset date (e.g., xxx.zip -> xxx-202401231619.zip).false
-asset_extractRD_ASSET_EXTRACTOptional. Automatically extract files (supports zip, gz, and tar.gz).false

License

Apache-2.0