The following is an example of a GitHub Actions workflow to run Mihari.
name: Mihari searches
on:
schedule:
- cron: "0 1 * * *"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: |
sudo apt-get -yqq install sqlite3 libsqlite3-dev libpq-dev libmysqlclient-dev
- name: Set up Ruby 3.2
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2"
bundler-cache: true
- name: Run Mihari
env:
CENSYS_ID: ${{ secrets.CENSYS_ID }}
CENSYS_SECRET: ${{ secrets.CENSYS_SECRET }}
SHODAN_API_KEY: ${{ secrets.SHODAN_API_KEY }}
DATABASE_URL: ${{ secrets.DATABASE_URL }}
run: |
mihari search ...
Note that this example assumes that you have Gemfile
in your repository.
# frozen_string_literal: true
source "<https://rubygems.org>"
gem "pg" # if you use PostgresSQL
gem "mysql2" # if you use MySQL
gem "mihari"