Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: ci

on:
push:
branches:
- 'master'
pull_request:
branches:
- 'master'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: rustfmt

- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true

- run: cargo build --locked --all-features -v
- run: cargo test --all-features -v
- run: cargo fmt --all -- --check
58 changes: 58 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: release

on:
push:
tags:
- 'v*'

env:
IMAGE_NAME: monadfoundation/soteria

jobs:
artifacts:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5

- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: rustfmt

- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true

- run: cargo build --release --locked --all-features -v

- name: Upload release version artifact
uses: actions/upload-artifact@v4
with:
name: soteria
path: ./target/release/soteria

docker:
runs-on: ubuntu-latest
steps:
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.IMAGE_NAME }}

- name: Build and push image
uses: docker/build-push-action@v6
with:
push: true
sbom: true
provenance: mode=max
tags: ${{ steps.meta.outputs.tags }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/target
.DS_Store
mocks/*
mocks/
238 changes: 226 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading