aboutsummaryrefslogtreecommitdiff
path: root/.github/actions/setup-rust/action.yaml
diff options
context:
space:
mode:
Diffstat (limited to '.github/actions/setup-rust/action.yaml')
-rw-r--r--.github/actions/setup-rust/action.yaml86
1 files changed, 43 insertions, 43 deletions
diff --git a/.github/actions/setup-rust/action.yaml b/.github/actions/setup-rust/action.yaml
index 8cf9997..67c0c8d 100644
--- a/.github/actions/setup-rust/action.yaml
+++ b/.github/actions/setup-rust/action.yaml
@@ -1,52 +1,52 @@
name: Setup Rust
description: Setup Rust
inputs:
- target:
- description: toolchain target triple
- required: false
- save-cache:
- description: Whether to save the Rust cache
- required: false
- default: 'false'
+ target:
+ description: toolchain target triple
+ required: false
+ save-cache:
+ description: Whether to save the Rust cache
+ required: false
+ default: 'false'
runs:
- using: 'composite'
- steps:
- - name: Install Rust
- id: toolchain
- uses: dtolnay/rust-toolchain@stable
- with:
- target: ${{ inputs.target }}
- toolchain: stable
- components: clippy, rustfmt
+ using: composite
+ steps:
+ - name: Install Rust
+ id: toolchain
+ uses: dtolnay/rust-toolchain@stable
+ with:
+ target: ${{ inputs.target }}
+ toolchain: stable
+ components: clippy, rustfmt
- - name: Cache Rust Dependencies
- uses: Swatinem/rust-cache@v2
- with:
- save-if: ${{ inputs.save-cache }}
- prefix-key: 'v0-rust-deps'
- shared-key: ${{ inputs.target }}
+ - name: Cache Rust Dependencies
+ uses: Swatinem/rust-cache@v2
+ with:
+ save-if: ${{ inputs.save-cache }}
+ prefix-key: v0-rust-deps
+ shared-key: ${{ inputs.target }}
- - name: Cargo config.toml
- shell: bash
- run: echo '{}' | npx -y mustache - .cargo/config.toml.mustache .cargo/config.toml
+ - name: Cargo config.toml
+ shell: bash
+ run: echo '{}' | npx -y mustache - .cargo/config.toml.mustache .cargo/config.toml
- - name: Restore cached Prisma codegen
- id: cache-prisma-restore
- uses: actions/cache/restore@v3
- with:
- key: prisma-1-${{ runner.os }}-${{ hashFiles('./core/prisma/*', './Cargo.toml') }}
- path: crates/prisma/src/**/*.rs
+ - name: Restore cached Prisma codegen
+ id: cache-prisma-restore
+ uses: actions/cache/restore@v3
+ with:
+ key: prisma-1-${{ runner.os }}-${{ hashFiles('./core/prisma/*', './Cargo.toml') }}
+ path: crates/prisma/src/**/*.rs
- - name: Generate Prisma client
- working-directory: core
- if: ${{ steps.cache-prisma-restore.outputs.cache-hit != 'true' }}
- shell: bash
- run: cargo prisma generate
+ - name: Generate Prisma client
+ working-directory: core
+ if: ${{ steps.cache-prisma-restore.outputs.cache-hit != 'true' }}
+ shell: bash
+ run: cargo prisma generate
- - name: Save Prisma codegen
- id: cache-prisma-save
- if: ${{ inputs.save-cache == 'true' }}
- uses: actions/cache/save@v3
- with:
- key: ${{ steps.cache-prisma-restore.outputs.cache-primary-key }}
- path: crates/prisma/src/**/*.rs
+ - name: Save Prisma codegen
+ id: cache-prisma-save
+ if: ${{ inputs.save-cache == 'true' }}
+ uses: actions/cache/save@v3
+ with:
+ key: ${{ steps.cache-prisma-restore.outputs.cache-primary-key }}
+ path: crates/prisma/src/**/*.rs