Skip to content

Latest commit

 

History

History
73 lines (50 loc) · 1.71 KB

README.md

File metadata and controls

73 lines (50 loc) · 1.71 KB

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