Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
award

GitHub Action

tools.deps-builder

0.4.2 Pre-release

tools.deps-builder

award

tools.deps-builder

Invoke the Clojure tools.deps CLI. Mainly here to support CI tests

Installation

Copy and paste the following snippet into your .yml file.

              

- name: tools.deps-builder

uses: vouch-opensource/[email protected]

Learn more about this action in vouch-opensource/tools.deps-build

Choose a version

tools.deps-build

A Github action to enable Clojure projects to invoke the tools.deps CLI

The primary goal is to support CI tests.

The action is based on a Docker container that has Clojure installed over adoptopenjdk/openjdk8:alpine-slim

Note: Since the action is not interactive, it invokes the CLI via clojure rather than clj. This distinction should usually be unimportant and is mentioned here for completeness.

Inputs

alias

Optional: The alias or concatenated aliases (eg :ci, :mem:test, ...)

Default: :test

java-opts

Optional: Any java opts (eg -Xmx512m)

Default: none are set

ssh-key

Optional: A GitHub secret that has the The SSH key needed to access code from other private repositories (eg ${{ secrets.SSH_PRIVATE_KEY }})

Default: no SSH agent is started or key used

Why an SSH key?

When running this action to you might need to fetch dependencies from your other private repositories.

GitHub Actions only have access to the repository they run for. To access additional private repositories you need to provide an SSH key with sufficient access privileges.

Please note that there are some other actions on the GitHub marketplace that enable setting up an SSH agent. Our experience is that the mechanisms to support SSH agent interplay between actions is complex and complexity brings risks. We think that it is more straightforward and secure to have this action support the feature within its own scope. We will continue to review this choice as the Docker options improve and the GitHub environment matures.

For security purposes, we do not expose the SSH agent outside of this action.

SSH Setup

  1. Create an SSH key with sufficient access privileges. For security reasons, don't use your personal SSH key but set up a dedicated one for use in GitHub Actions. See the Github documentation for more support.
  2. Make sure you don't have a passphrase set on the private key.
  3. In your repository, go to the Settings > Secrets menu and create a new secret. In this example, we'll call it SSH_PRIVATE_KEY. Put the contents of the private SSH key file into the contents field.
  4. This key must start with -----BEGIN ... PRIVATE KEY-----, consist of many lines and ends with -----END ... PRIVATE KEY-----.

Example usage - default, to run :test alias

uses: actions/tools.deps-builder@v1

Example usage - pass an SSH key to run the tests

uses: actions/tools.deps-builder@v1
with:
  ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}

Example usage - invoke :xyz alias

uses: actions/tools.deps-builder@v1
with:
  alias: :xyz

Example usage - pass Java opts

uses: actions/tools.deps-builder@v1
with:
  java-opts: -Xmx512m -Xms128m

Example usage - pass Java opts and use :abc alias

uses: actions/tools.deps-builder@v1
with:
  alias: :abc
  java-opts: -Xmx512m -Xms128m

License

The scripts and documentation in this project are released under the MIT License