mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-17 04:55:42 +09:00
30 lines
1.0 KiB
YAML
30 lines
1.0 KiB
YAML
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
name: CI helper
|
|
description: Restore or build the shared Rust CI helper
|
|
inputs:
|
|
save:
|
|
description: Save a missing helper cache on main
|
|
required: false
|
|
default: 'false'
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- name: Restore ci helper
|
|
id: cache
|
|
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9
|
|
with:
|
|
path: target/debug/fluxer-ci
|
|
key: >-
|
|
fluxer-ci-bin-${{ runner.os }}-1.98.1-${{ hashFiles('Cargo.lock', 'Cargo.toml',
|
|
'tools/ci/Cargo.toml', 'tools/ci/src/**') }}
|
|
- name: Build ci helper
|
|
if: steps.cache.outputs.cache-hit != 'true'
|
|
shell: bash
|
|
run: cargo build --locked --package fluxer-ci
|
|
- name: Save ci helper
|
|
if: inputs.save == 'true' && github.ref == 'refs/heads/main' && steps.cache.outputs.cache-hit != 'true'
|
|
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9
|
|
with:
|
|
path: target/debug/fluxer-ci
|
|
key: ${{ steps.cache.outputs.cache-primary-key }}
|