|
1 | 1 | # 🚦 soteria |
2 | | -A simple CLI tool that validates Safe transaction hashes in JSON log files. |
| 2 | +A simple CLI tool that validates Safe transaction hashes in JSON log files. This is |
| 3 | +a metarepo that contains the CLI tool, a GitHub action, and a Docker image for easy integration into various workflows. |
3 | 4 |
|
4 | 5 | ## Quickstart |
5 | 6 |
|
6 | | -### Using CLI |
| 7 | +### Install from source |
| 8 | +To install soteria from source, ensure you have Rust and Cargo installed. Then, you can use the CLI tool as follows: |
7 | 9 | ```bash |
8 | 10 | cargo install --git https://github.com/monad-developers/soteria.git |
9 | 11 | soteria /path/to/your/logs/directory |
10 | 12 | ``` |
11 | 13 |
|
| 14 | +### Build and install from source |
| 15 | +To build soteria from source, ensure you have Rust and Cargo installed. Then, clone the repository and build the project: |
| 16 | +```bash |
| 17 | +git clone https://github.com/monad-developers/soteria.git |
| 18 | +cd soteria |
| 19 | +cargo install --path . |
| 20 | +soteria /path/to/your/logs/directory |
| 21 | +``` |
| 22 | + |
| 23 | +### Using GitHub Actions |
| 24 | +If you want to integrate soteria into your CI/CD pipeline, you can use the GitHub action: |
| 25 | +```yaml |
| 26 | +- name: Run soteria |
| 27 | + id: soteria |
| 28 | + uses: monad-developers/soteria-action@v0.1.7 |
| 29 | + with: |
| 30 | + directory: '/path/to/your/logs/directory' |
| 31 | +``` |
| 32 | +
|
| 33 | +A full list of available flags for the GitHub action is provided below: |
| 34 | +| Input | Required? | Default | Description | |
| 35 | +|-----------------|-----------|----------|--------------------------------------| |
| 36 | +| `directory` | Yes | N/A | Directory containing log files. | |
| 37 | +| `version` | No | `latest` | Version of soteria to use. | |
| 38 | +| `github-token` | No | N/A | GitHub token for authentication. | |
| 39 | +| `fail-on-error` | No | `true` | Whether to fail the action on error. | |
| 40 | + |
12 | 41 | ### Using Docker |
| 42 | +You can also run soteria using Docker. There are two options: using a pre-built image or building the image from source. Images use statically linked binaries and are run in a minimal non-root environment for security. |
| 43 | + |
| 44 | +#### Pre-built image |
| 45 | +```bash |
| 46 | +docker pull monadfoundation/soteria |
| 47 | +``` |
| 48 | + |
| 49 | +#### Build from source |
13 | 50 | ```bash |
| 51 | +git clone https://github.com/monad-developers/soteria.git |
| 52 | +cd soteria |
14 | 53 | docker build -t soteria . |
15 | 54 | ``` |
16 | 55 |
|
17 | | -Replace `$(pwd)/src/mocks` with your directory of files to check: |
| 56 | +#### Run the image |
18 | 57 | ```bash |
19 | | -docker run -v $(pwd)/src/mocks:/mnt/data soteria /mnt/data |
| 58 | +docker run -v <path-to-your-logs>:/mnt/data soteria /mnt/data |
20 | 59 | ``` |
0 commit comments