Skip to content

SpectralOps/setup-preflight-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

✈️ 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