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

GitHub Action

Install a binary from GitHub releases

v1.6.0

Install a binary from GitHub releases

archive

Install a binary from GitHub releases

Install binaries from GitHub releases

Installation

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

              

- name: Install a binary from GitHub releases

uses: jaxxstorm/action-install-gh-release@v1.6.0

Learn more about this action in jaxxstorm/action-install-gh-release

Choose a version

install-gh-release GitHub Action

This repository contains an action for use with GitHub Actions, which will install any GitHub release into your action environment:

This is especially useful when installing arbitrary Go binaries. It can lookup the latest version, or download a specific tag.

Usage

This action requires a Github Token (GITHUB_TOKEN) in the environment to authenticate with.

Grab the Latest Version

# ...
steps:
  - name: Install go-task
    uses: jaxxstorm/action-install-gh-release@v1.5.0
    with: # Grab the latest version
      repo: go-task/task
    env:
      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Github token scoped to step

Grab a Specific Tags

# ...
jobs:
  my_job:
    env:
      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Github token scoped to job
    steps:
      - name: Install tf2pulumi
        uses: jaxxstorm/action-install-gh-release@v1.5.0
        with: # Grab a specific tag
          repo: pulumi/tf2pulumi
          tag: v0.7.0

Grab a Specific Platform And/Or Architecture

name: my_action

env:
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Github token scoped to action

jobs:
  my_job:
    steps:
      - name: Install tfsec
        uses: jaxxstorm/action-install-gh-release@v1.5.0
        with: # Grab a specific platform and/or architecture
          repo: aquasecurity/tfsec
          platform: linux
          arch: x86-64

Finding a release

By default, this action will lookup the Platform and Architecture of the runner and use those values to interpolate and match a release package. The release package name is first converted to lowercase. The match pattern is:

`(osPlatform|osArchs).*(osPlatform|osArchs).*\.(tar\.gz|zip)`;

Natively, the action will only match the following platforms: linux, darwin, windows.

Some examples of matches:

  • my_package_linux_x86_64.tar.gz (or .zip)
  • my_package_x86_64_linux.tar.gz (or .zip)
  • my_package.linux.x86_64.tar.gz (or .zip)
  • my_package.x86_64.linux.tar.gz (or .zip)
  • linux_x86_64_my_package.tar.gz (or .zip)
  • x86_64_linux_my_package.tar.gz (or .zip)
  • linux.x86_64.my_package.tar.gz (or .zip)
  • x86_64.linux.my_package.tar.gz (or .zip)
  • linux_x86_64.tar.gz (or .zip)
  • x86_64_linux.tar.gz (or .zip)
  • linux.x86_64.tar.gz (or .zip)
  • x86_64.linux.tar.gz (or .zip)