Skip to content

Check binary dependencies that should be met for running a workflow

License

Notifications You must be signed in to change notification settings

Mitigram/gh-action-dependency-check

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Binary Dependency Check

This action will check the presence of a list of binaries to ensure that your job/workflow will be able to perform all necessary operations at the runner. The action fails as soon as one of the binaries cannot be found, it will print out an error message that will be available in the logs. You will probably want to use this action in the early steps of your jobs in order to fail as soon as possible.

This action is particularily useful for making sure self-hosted runners in heterogeneous environment are populated with the right set of tools for the job to complete. The action makes visible your binary dependencies, and facilitate picking existing runners or when creating new ones.

Usage

See action.yml

Check a Single Binary

The following checks that docker is accessible at the $PATH.

steps:
- uses: Mitigram/gh-action-dependency-check@main
  with:
    dependency: docker

Check Several Binaries

The following checks that both docker and docker-compose are accessible at the $PATH.

steps:
- uses: Mitigram/gh-action-dependency-check@main
  with:
    dependency: docker docker-compose

Instead, you can provide a list of binaries to check by separating them with line breaks, such as in the following example. This makes dependencies more visible and YAML files easier to read.

steps:
- uses: Mitigram/gh-action-dependency-check@main
  with:
    dependency: |
      docker
      docker-compose

Increased Verbosity

The options action input can be used to provide more options to the internal dependency check implementation. You can use -v to increase verbosity, which will print out the location of each binary that was found accessible at the $PATH.

steps:
- uses: Mitigram/gh-action-dependency-check@main
  with:
    dependency: docker
    options: -v

Developer Notes

You can use the testing workflow.yml in combination with act to manually test this action. Provided act is installed, the following command, run from the root directory, would exercise this action:

act -b -W . -j test

Running act through dew is possible if you do not want to install act in your environment. Just replace act with dew act in the command above.

About

Check binary dependencies that should be met for running a workflow

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages