Skip to content
spectralops

GitHub Action

Setup Preflight

v1 Latest version

Setup Preflight

spectralops

Setup Preflight

Setup Preflight by installing, downloading, and adding it to the path

Installation

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

              

- name: Setup Preflight

uses: SpectralOps/setup-preflight-action@v1

Learn more about this action in SpectralOps/setup-preflight-action

Choose a version

✈️ setup-preflight-action

Set up your GitHub Actions workflow with a specific version of Preflight.

💡 Usage

Use the following to set up a preflight binary that's available in your workflow steps:

      - name: Setup Preflight
        uses: spectralops/setup-preflight@v1
        with:
            preflight-version: "1.1.3"

And then, use preflight. Turn this risky business:

      - name: Install w/curl
        run:  curl -fsSL https://deno.land/x/install/install.sh | sh

Into this 1-2 karate chop:

1️⃣ On your mac (brew tap spectralops/tap && brew install preflight)

$ curl -fsSL https://deno.land/x/install/install.sh | preflight create
sha256=561aa9d6533ca228c43e784bf9fe8b74c8bfd8c443386dbf20bb714ac2969ceb

2️⃣ In your workflow (you now have preflight available):

      - name: Install w/curl protected with Preflight
        run:  curl -fsSL https://deno.land/x/install/install.sh | preflight run sha256=561aa9d6533ca228c43e784bf9fe8b74c8bfd8c443386dbf20bb714ac2969ceb

📋 Workflow

name: run with preflight
on:
  push:
    branches:
      - master
      - main
  pull_request:

jobs:
  build:
    name: Build your code
    runs-on: ubuntu-latest

    steps:
      - name: Clone repo
        uses: actions/checkout@master


      # set up preflight
      - name: Setup Preflight
        uses: spectralops/setup-preflight@v1


      - name: Install w/curl protected with Preflight
        run:  curl -fsSL https://deno.land/x/install/install.sh | preflight run sha256=561aa9d6533ca228c43e784bf9fe8b74c8bfd8c443386dbf20bb714ac2969ceb
      
      - name: do stuff
        run: echo stuff