mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-17 04:55:42 +09:00
39 lines
1.8 KiB
YAML
39 lines
1.8 KiB
YAML
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
name: App Wasm cache
|
|
description: Restore or save the shared application Wasm artifacts
|
|
inputs:
|
|
mode:
|
|
description: Cache operation (restore or save)
|
|
required: true
|
|
outputs:
|
|
cache-hit:
|
|
description: Whether the restore found the exact artifact key
|
|
value: ${{ steps.cache.outputs.cache-hit }}
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- name: Resolve artifact key
|
|
id: key
|
|
if: always()
|
|
shell: bash
|
|
run: echo "key=app-wasm-${{ runner.os }}-1.98.1-${{ hashFiles('Cargo.lock', 'tools/ci/src/app_wasm.rs', 'fluxer_app/rust/libfluxcore/Cargo.toml', 'fluxer_app/rust/libfluxcore/Cargo.lock', 'fluxer_app/rust/libfluxcore/.cargo/config.toml', 'fluxer_app/rust/libfluxcore/src/**', 'fluxer_app/rust/libfluxwebp/Cargo.toml', 'fluxer_app/rust/libfluxwebp/Cargo.lock', 'fluxer_app/rust/libfluxwebp/src/**', 'fluxer_app/rust/libfluxwebp/shim/**', 'fluxer_app/rust/libfluxwebp/simd/**', 'packages/markdown_parser/rust/Cargo.toml', 'packages/markdown_parser/rust/.cargo/config.toml', 'packages/markdown_parser/rust/src/**') }}" >> "$GITHUB_OUTPUT"
|
|
- name: Restore artifacts
|
|
id: cache
|
|
if: inputs.mode == 'restore'
|
|
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9
|
|
with:
|
|
path: |
|
|
fluxer_app/pkgs/libfluxcore
|
|
fluxer_app/pkgs/libfluxwebp
|
|
fluxer_app/src/features/messaging/utils/markdown/parser/MarkdownParserWasmBytes.ts
|
|
key: ${{ steps.key.outputs.key }}
|
|
- name: Save artifacts
|
|
if: always() && inputs.mode == 'save'
|
|
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9
|
|
with:
|
|
path: |
|
|
fluxer_app/pkgs/libfluxcore
|
|
fluxer_app/pkgs/libfluxwebp
|
|
fluxer_app/src/features/messaging/utils/markdown/parser/MarkdownParserWasmBytes.ts
|
|
key: ${{ steps.key.outputs.key }}
|