mirror of
https://github.com/DeterminateSystems/magic-nix-cache-action.git
synced 2024-12-23 05:22:07 +01:00
21c3863b07
Co-authored-by: Zhaofeng Li <hello@zhaofeng.li>
21 lines
706 B
Makefile
21 lines
706 B
Makefile
# A creds.json can be specified to test auto-caching locally.
|
|
# See <https://github.com/DeterminateSystems/magic-nix-cache> for
|
|
# instructions on how to obtain this file.
|
|
github_creds_json := env_var_or_default('GITHUB_CREDS_JSON', '')
|
|
|
|
# List available recipes
|
|
default:
|
|
@just --list --unsorted --justfile {{justfile()}}
|
|
|
|
# Install dependencies
|
|
install:
|
|
bun i --no-summary --ignore-scripts
|
|
|
|
# Build the action
|
|
build: install
|
|
bun run build
|
|
|
|
# Run CI locally
|
|
act job='run-x86_64-linux': build
|
|
act -j {{job}} -P ubuntu-22.04=catthehacker/ubuntu:act-22.04 \
|
|
{{ if github_creds_json != '' { "--env-file <(jq -r '. | to_entries[] | .key + \"=\" + .value' " + github_creds_json + ")" } else { '' } }}
|