Coder Social home page Coder Social logo

gitea-update's Introduction

Gitea Update Tool

Purpose

The Gitea Update Tool is a command-line utility designed to manage and automate the updating process for the gitea and act_runner binaries on Linux servers. It ensures that your binaries are kept up-to-date with the latest stable or development versions, managing backups and permissions seamlessly.

Command Line Arguments

  • --info - Displays the current, latest, and development versions of the binaries.
  • --install - Installs the latest stable versions of the specified binaries.
  • --dev - When used with --install, installs the latest development versions instead of the stable versions.
  • --version - Displays the version of the Gitea Update Tool.
  • --path - Specifies a custom path where the binaries are located (default is /opt/gitea).
  • --user - Specifies the system user that should own the binary files (default is app).
  • --group - Specifies the system group that should own the binary files (default is app).

Example Usage

# Display current version information of both managed binaries
gitea-update --info

# Install the latest stable versions of gitea and act_runner
gitea-update --install

# Install the latest development versions of gitea and act_runner
gitea-update --install --dev

# Display the version of the Gitea Update Tool
gitea-update --version

Configuration

The Gitea Update Tool uses a YAML configuration file to manage settings related to binary paths, user/group ownership, and source URLs for downloading updates. Below is the structure of the configuration file:

settings:
  user: "app"
  group: "app"
  services:
    gitea:
      bin: "gitea"
      path: "/opt/gitea"
      urls:
        download: "https://dl.gitea.io/gitea/{version}/gitea-{version}-linux-amd64"
        api: "https://api.github.com/repos/go-gitea/gitea/tags"
    act_runner:
      bin: "act_runner"
      path: "/opt/gitea"
      urls:
        download: "https://dl.gitea.com/act_runner/{version}/act_runner-{version}-linux-amd64"
        api: "https://gitea.com/api/v1/repos/gitea/act_runner/tags"

Configuration File Locations

The tool will search for the configuration file in the following locations, in order:

  • The current directory from which the tool is run.
  • The home directory of the current user (~/gitea-update.yml).
  • /etc/gitea-update/gitea-update.yml for system-wide settings.

Make sure the configuration file is properly secured with the correct permissions, as it contains sensitive information regarding your server setup.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

gitea-update's People

Contributors

alexhendel avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.