diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 53e5754..6ae8459 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -6,7 +6,7 @@ on: jobs: pr-pull: if: contains(github.event.pull_request.labels.*.name, 'pr-pull') - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest steps: - name: Set up Homebrew uses: Homebrew/actions/setup-homebrew@master diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0a27f39..46958e3 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -8,14 +8,12 @@ jobs: test-bot: strategy: matrix: - os: [ubuntu-22.04, macos-12] + os: [ubuntu-latest, macos-latest] runs-on: ${{ matrix.os }} steps: - name: Set up Homebrew id: set-up-homebrew uses: Homebrew/actions/setup-homebrew@master - with: - token: ${{ secrets.GH_TOKEN }} - name: Cache Homebrew Bundler RubyGems id: cache diff --git a/Formula/sigscan.rb b/Formula/sigscan.rb new file mode 100644 index 0000000..9e38b51 --- /dev/null +++ b/Formula/sigscan.rb @@ -0,0 +1,42 @@ +class Sigscan < Formula + desc "Inspect container images and other artifacts for signatures" + homepage "https://github.com/venafi/sigscan" + url "https://github.com/venafi/sigscan/archive/refs/tags/v0.1.0.tar.gz" + version "0.1.0" + license "Apache-2.0" + head "https://github.com/venafi/sigscan.git", tag: "v0.1.0" + + on_macos do + if Hardware::CPU.intel? + url "https://github.com/Venafi/sigscan/releases/download/v#{version}/sigscan-darwin-amd64" + sha256 "6365128a172eb19053eee81d274724e96a29640a9366230e90213183f551e93b" + end + + if Hardware::CPU.arm? + url "https://github.com/Venafi/sigscan/releases/download/v#{version}/sigscan-darwin-arm64" + sha256 "8022f6350489c03400ce6cc441d864c747f6d645df47ff60c854e05c3c4dd24e" + end + end + + on_linux do + if Hardware::CPU.intel? + url "https://github.com/Venafi/sigscan/releases/download/v#{version}/sigscan-linux-amd64" + sha256 "53c84ff2888f509477cafd903402f8afe51c81912afc451b26bfba42e9107264" + end + + if Hardware::CPU.arm? + url "https://github.com/Venafi/sigscan/releases/download/v#{version}/sigscan-linux-arm64" + sha256 "bfbc28191d0717344f2e46ef10e0609272b87e74bcb9e9ee459bb0b26faea0ba" + end + end + + def install + cpu = Hardware::CPU.intel? ? "amd64" : "arm64" + os = OS.mac? ? "darwin" : "linux" + bin.install "sigscan-#{os}-#{cpu}" => "sigscan" + end + + test do + system "#{bin}/sigscan", "-h" + end +end diff --git a/README.md b/README.md index 4d1b56b..802ee02 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,15 @@ ## How do I install these formulae? -`brew install venafi/venafi/` +`brew install venafi/tap/` -Or `brew tap venafi/venafi` and then `brew install `. +Or `brew tap venafi/tap` and then `brew install `. + +## Formulae + +| Repository | Formula | Description | +| ---------- | ------- | ----------- | +| [sigscan](https://github.com/venafi/sigscan) | [formula](Formula/sigscan.rb) | Inspect container images and other artifacts for signatures | ## Documentation