Skip to content
box

GitHub Action

Setup Forklift

v1.0.0 Latest version

Setup Forklift

box

Setup Forklift

Sets up the Forklift CLI in your GitHub Actions workflow

Installation

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

              

- name: Setup Forklift

uses: forklift-run/setup-forklift@v1.0.0

Learn more about this action in forklift-run/setup-forklift

Choose a version

Setup Forklift GitHub Action

GitHub action to configure the Forklift CLI in your GitHub Actions workflow.

Forklift is an open source tool for distributing updating apps on embedded Linux.

Basic Usage

Here we see a simple template that checks out the pallet, installs the specified version of the Forklift CLI, and then verifies the pallet.

name: Run Forklift checks
on: [push]
jobs:
  forklift-checks:
    runs-on: ubuntu-latest
    steps:
    - name: Check out repository code
      uses: actions/checkout@v4

    - name: Setup Forklift
      uses: PlanktoScope/setup-forklift@v1
      with:
        version: v0.5.0

    - name: Run Forklift checks
      run: |
        forklift dev plt cache-repo
        forklift dev plt check
        forklift dev plt plan
        forklift dev plt plan --parallel

Choose Forklift Version

When Forklift is installed on the GitHub runner, you can select a the specific version of Forklift you wish to run.

steps:
  - name: Setup Forklift
    uses: PlanktoScope/setup-forklift@v1
    with:
      version: 0.5.0

Or, Forklift can be locked to a SemVer range.

steps:
  - name: Setup Forklift
    uses: PlanktoScope/setup-forklift@v1
    with:
      version: 0.4.x
steps:
  - name: Setup Forklift
    uses: PlanktoScope/setup-forklift@v1
    with:
      version: 0.4
steps:
  - name: Setup Forklift
    uses: PlanktoScope/setup-forklift@v1
    with:
      version: <0.4

You can also choose to run your checks against multiple versions of Forklift.

strategy:
  matrix:
    forklift-version: [0.5.x, 0.4.x]
steps:
  - name: Setup Forklift
    uses: PlanktoScope/setup-forklift@v1
    with:
      version: ${{ matrix.forklift-version }}

Inputs

The action supports the following inputs:

  • version: Required. SemVer ranges are supported, so instead of a full version string, you can use 0.5. This enables you to automatically get the latest backward compatible changes in the v0.5 release.

Outputs

This action does not set any direct outputs.

Credits

This repository was copied and adapted from the Open Policy Agent project's setup-opa repository, published under the Apache 2.0 License; as a result, this repository is also released under the Apache 2.0 License. Thanks also to the folks over at Infracost who created the initial version of that repository.