GithubHelp home page GithubHelp logo

lvsecoto / actions-use-apt-tools Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tecolicom/actions-use-apt-tools

0.0 0.0 0.0 37 KB

Github action for apt packages

License: MIT License

Shell 51.02% Makefile 48.98%

actions-use-apt-tools's Introduction

actions-use-apt-tools

actions-use-apt-tools

This GitHub action installs Linux APT packages and cache them for later use. When executed next time with same package list, and any other environment are not changed, installed files are extracted from the cached archive.

When valid cached archive is not found, all packages are installed by apt-get command. If you want partial install/cache behavior, use this action multiple times.

There are two different methods to identify installed files. Default is package method, and files are taken by dpkg -L command. This method runs very fast. For packages generate files during installation, use timestamp method, and all files those have newer timestamp are cached. Files are searched under /etc, /usr/{bin,sbin,lib,share} and /var/lib directory. Search directries can be given by path parameter.

Output is same as @actions/cache.

Usage

# inputs:
#   tools:  { required: true,  type: string }
#   cache:  { required: false, type: string, default: yes }
#   key:    { required: false, type: string }
#   method: { required: false, type: string, default: package }
#   path:   { required: false, type: string,
#             default: "/etc /usr/bin /usr/sbin /usr/lib /usr/share /var/lib" }

- uses: tecolicom/actions-use-apt-tools@v1
  with:

    # apt packages
    tools: ''

    # Cache strategy
    #
    # yes:      activate cache
    # no:       no cache
    # workflow: effective within same workflow (mainly for test)
    #
    cache: yes

    # Additional cache key
    key: ''

    # Method to idenfity installed files
    #   package:   use "dpkg -L" command output
    #   timestamp: use file's timestamps to check update
    method: package

    # Search path with "timestamp" method
    path: ''

Example

Normal case with default package method

- uses: tecolicom/actions-use-apt-tools@v1
  with:
    tools: bmake

Using timestamp method

For packages which generates additional files other than included in package during installation, use timestamp method. If you know where they will be placed, provide them by a path parameter.

- uses: tecolicom/actions-use-apt-tools@v1
  with:
    tools: mecab mecab-ipadic mecab-ipadic-utf8
    method: timestamp

See Also

actions-use-apt-tools's People

Contributors

kaz-utashiro avatar lvsecoto 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.