Skip to content

perf(ci): cache cargo #34

perf(ci): cache cargo

perf(ci): cache cargo #34

Workflow file for this run

name: Build
on:
push:
branches: main
paths:
- .github/workflows/build.yml
- Dockerfile.build
- Cargo.toml
- src/**
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Graphite
run: sudo apt install -y libgraphite2-dev
- name: Cache Cargo
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Lint
run: cargo clippy
build:
uses: winstxnhdw/actions/.github/workflows/docker-push.yml@main
with:
file: Dockerfile.build
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
permissions:
packages: write
restart:
needs: [lint, build]
uses: winstxnhdw/actions/.github/workflows/spaces-restart.yml@main
secrets:
token: ${{ secrets.HF_TOKEN }}