Skip to content

Latest commit

 

History

History
179 lines (121 loc) · 5.26 KB

install.md

File metadata and controls

179 lines (121 loc) · 5.26 KB

Installation

This document describes how to install actionlint.

Windows

actionlint package is available in the community repo:

choco install actionlint

actionlint package is available in the main bucket:

scoop install actionlint

actionlint package is available in the winget-pkgs repo:

winget install actionlint

Linux

actionlint package is available in the official repo:

pacman -S actionlint

Alternatively actionlint is also available on AUR. The packages can be installed via paru command.

actionlint package is available in the Nix ecosystem:

On NixOS:

nix-env -iA nixos.actionlint

On Non NixOS:

nix-env -iA nixpkgs.actionlint

macOS

actionlint formula is provided by Homebrew officially.

brew install actionlint

Alternatively rhysd/actionlint repository also provides its own Homebrew package, which is automatically updated on new release. If you prefer it, tap the repository before running brew install.

brew tap "rhysd/actionlint" "https://github.com/rhysd/actionlint"
brew install actionlint

Prebuilt binaries

Download an archive file from the releases page for your platform, unarchive it and put the executable file to a directory in $PATH.

Prebuilt binaries are built at each release by CI for the following OS and arch:

  • macOS (x86_64, arm64)
  • Linux (i386, x86_64, arm32, arm64)
  • Windows (i386, x86_64, arm64)
  • FreeBSD (i386, x86_64)

Note: The following targets are not tested since GitHub Actions doesn't support them:

  • Linux i386, arm32, arm64
  • Windows i386, arm64
  • FreeBSD i386, x86_64

Download script

To install actionlint executable with one command, the download script is available. It downloads the latest version of actionlint (actionlint.exe on Windows and actionlint on other OSes) to the current directory automatically. This is a recommended way if you install actionlint in some shell script.

bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)

When you need to install specific version of actionlint, please give the version to the 1st command line argument. The following example installs v1.6.17.

bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) 1.6.17

This script downloads actionlint (or actionlint.exe on Windows) binary to the current working directory. When you need to put the downloaded binary to some other directory, please give the directory path to the 2nd command line argument. The following example installs the latest version to /usr/bin.

bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) latest /usr/bin

For the usage of actionlint on GitHub Actions, see the usage document.

Docker image

See the usage document to know how to install and use an official actionlint Docker image.

asdf

You can install actionlint with the asdf version manager using the asdf-actionlint plugin, which automates the process of installing (and switching between) various versions of GitHub release binaries. With asdf already installed, run these commands to install actionlint:

# Add actionlint plugin
asdf plugin add actionlint

# Show all installable versions
asdf list-all actionlint

# Install specific version
asdf install actionlint latest

# Set a version globally (on your ~/.tool-versions file)
asdf global actionlint latest

Build from source

Recent Go toolchain is necessary to build actionlint from source. Use Go 1.16 or later.

# Install the latest stable version
go install github.com/rhysd/actionlint/cmd/actionlint@latest

# Install the head of main branch
go install github.com/rhysd/actionlint/cmd/actionlint

Checks | Usage | Configuration | Go API | References