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
30 changes: 30 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
version: 2
updates:
- package-ecosystem: cargo
directory: /
schedule:
interval: weekly
groups:
cargo-minor-and-patch:
update-types: ['minor', 'patch']

- package-ecosystem: npm
directory: /ui
schedule:
interval: weekly
groups:
npm-minor-and-patch:
update-types: ['minor', 'patch']

- package-ecosystem: npm
directory: /docs/site
schedule:
interval: weekly
groups:
npm-minor-and-patch:
update-types: ['minor', 'patch']

- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
75 changes: 40 additions & 35 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ on:
# Weekly vulnerability check (Mondays 9am UTC)
- cron: '0 9 * * 1'

permissions:
contents: read

concurrency:
group: docker-${{ github.ref }}
cancel-in-progress: true

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository_owner }}/hone-money
Expand All @@ -27,14 +34,16 @@ jobs:
security-scan-rust:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1

- name: Install Rust
uses: dtolnay/rust-toolchain@1.92.0
uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # v1
with:
toolchain: '1.92.0'

- name: Cache cargo-audit binary
id: cache-cargo-audit
uses: actions/cache@v4
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ~/.cargo/bin/cargo-audit
key: cargo-audit-0.22.0
Expand All @@ -49,14 +58,14 @@ jobs:
security-scan-node:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
sparse-checkout: |
ui/package.json
ui/package-lock.json

- name: Setup Node
uses: actions/setup-node@v4
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: '24'

Expand All @@ -67,13 +76,15 @@ jobs:
build-backend-amd64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1

- name: Install Rust
uses: dtolnay/rust-toolchain@1.92.0
uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # v1
with:
toolchain: '1.92.0'

- name: Cache cargo
uses: actions/cache@v4
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: |
~/.cargo/bin/
Expand All @@ -94,23 +105,24 @@ jobs:
run: chmod +x target/release/hone

- name: Upload binary
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: hone-x86_64-unknown-linux-gnu
path: target/release/hone

build-backend-arm64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1

- name: Install Rust
uses: dtolnay/rust-toolchain@1.92.0
uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # v1
with:
toolchain: '1.92.0'
targets: aarch64-unknown-linux-gnu

- name: Cache cargo
uses: actions/cache@v4
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: |
~/.cargo/bin/
Expand All @@ -134,18 +146,18 @@ jobs:
run: chmod +x target/aarch64-unknown-linux-gnu/release/hone

- name: Upload binary
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: hone-aarch64-unknown-linux-gnu
path: target/aarch64-unknown-linux-gnu/release/hone

build-frontend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1

- name: Setup Node
uses: actions/setup-node@v4
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: '24'
cache: 'npm'
Expand All @@ -160,7 +172,7 @@ jobs:
run: npm run build

- name: Upload frontend
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: frontend-dist
path: ui/dist
Expand All @@ -176,49 +188,42 @@ jobs:
actions: read

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1

- name: Download AMD64 binary
uses: actions/download-artifact@v4
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: hone-x86_64-unknown-linux-gnu
path: ./binaries/amd64

- name: Download ARM64 binary
uses: actions/download-artifact@v4
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: hone-aarch64-unknown-linux-gnu
path: ./binaries/arm64

- name: Download frontend
uses: actions/download-artifact@v4
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: frontend-dist
path: ./ui/dist

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0

- name: Login to GHCR
uses: docker/login-action@v3
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Login to DHI (Docker Hardened Images)
uses: docker/login-action@v3
with:
registry: dhi.io
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v5
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5.10.0
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
Expand All @@ -234,7 +239,7 @@ jobs:
chmod +x binaries/arm64/hone

- name: Build image (amd64 for scanning)
uses: docker/build-push-action@v5
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
with:
context: .
file: Dockerfile.release
Expand All @@ -243,7 +248,7 @@ jobs:
tags: ${{ env.IMAGE_NAME }}:scan

- name: Scan image for vulnerabilities
uses: aquasecurity/trivy-action@0.33.1
uses: aquasecurity/trivy-action@ed142fd0673e97e23eac54620cfb913e5ce36c25 # v0.36.0
with:
image-ref: ${{ env.IMAGE_NAME }}:scan
format: 'table'
Expand All @@ -253,14 +258,14 @@ jobs:

- name: Full vulnerability report (check for newly fixed CVEs)
if: github.event_name == 'schedule'
uses: aquasecurity/trivy-action@0.33.1
uses: aquasecurity/trivy-action@ed142fd0673e97e23eac54620cfb913e5ce36c25 # v0.36.0
with:
image-ref: ${{ env.IMAGE_NAME }}:scan
format: 'table'
severity: 'CRITICAL,HIGH'

- name: Build and push (multi-arch)
uses: docker/build-push-action@v5
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
with:
context: .
file: Dockerfile.release
Expand Down
15 changes: 11 additions & 4 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ on:
- '.github/workflows/docs.yml'
workflow_dispatch:

permissions:
contents: read

concurrency:
group: docs-deploy
cancel-in-progress: true

jobs:
deploy:
runs-on: ubuntu-latest
Expand All @@ -16,10 +23,10 @@ jobs:
deployments: write

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1

- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: '24'
cache: 'npm'
Expand All @@ -34,15 +41,15 @@ jobs:
run: npm run build

- name: Create project if needed
uses: cloudflare/wrangler-action@v3
uses: cloudflare/wrangler-action@9acf94ace14e7dc412b076f2c5c20b8ce93c79cd # v3.15.0
continue-on-error: true
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages project create hone-fyi --production-branch=main

- name: Deploy to Cloudflare Pages
uses: cloudflare/wrangler-action@v3
uses: cloudflare/wrangler-action@9acf94ace14e7dc412b076f2c5c20b8ce93c79cd # v3.15.0
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
Expand Down
13 changes: 10 additions & 3 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ on:
- '.github/workflows/pages.yml'
workflow_dispatch:

permissions:
contents: read

concurrency:
group: pages-deploy
cancel-in-progress: true

jobs:
deploy:
runs-on: ubuntu-latest
Expand All @@ -16,18 +23,18 @@ jobs:
deployments: write

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1

- name: Create project if needed
uses: cloudflare/wrangler-action@v3
uses: cloudflare/wrangler-action@9acf94ace14e7dc412b076f2c5c20b8ce93c79cd # v3.15.0
continue-on-error: true
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages project create hone-money --production-branch=main

- name: Deploy to Cloudflare Pages
uses: cloudflare/wrangler-action@v3
uses: cloudflare/wrangler-action@9acf94ace14e7dc412b076f2c5c20b8ce93c79cd # v3.15.0
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
Expand Down
63 changes: 63 additions & 0 deletions .github/workflows/rust-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Rust Tests

on:
push:
branches: [main]
paths:
- 'crates/**'
- 'Cargo.toml'
- 'Cargo.lock'
- '.github/workflows/rust-tests.yml'
pull_request:
branches: [main]
paths:
- 'crates/**'
- 'Cargo.toml'
- 'Cargo.lock'
- '.github/workflows/rust-tests.yml'
workflow_dispatch:

permissions:
contents: read

concurrency:
group: rust-tests-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
name: Format, lint, test
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1

- name: Install Rust
uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # v1
with:
toolchain: '1.92.0'
components: rustfmt, clippy

- name: Cache cargo
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-test-

- name: Install OpenSSL (for SQLCipher)
run: sudo apt-get update && sudo apt-get install -y pkg-config libssl-dev

- name: Check formatting
run: cargo fmt --all --check

- name: Clippy
run: cargo clippy --workspace --all-targets

- name: Run tests
run: cargo test --workspace
Loading
Loading