magic-nix-cache-action/action.yml
Graham Christensen 9ab3ce70d6
Matrix (#96)
* Update `detsys-ts` for: `Merge pull request #67 from DeterminateSystems/allow-obliterating-id-token-privs` (`4280bc94c9545f31ccf08001cc16f20ccb91b770`)

* Update the defaults / docs on the use-flakehub and use-gha-cache options

* Support the MNC trinary, to allow GHA cache to turn off if FHC is enabled

* let's go?

* arg, you can't parameterize the permissions

* don't fail fast

* Maybe if we bust the token sooner..?

* Clearer job names

* Debug...

* ?

* ...?

* ?

* fancy it up

* more seed

* Test against determinate too

* ...

* derp, obliterate

* Identify the failed-to-setup FHC as not being enabled

* Don't fail on github if the cache is throttled

* derp

* Add a success job for the ci workflow

---------

Co-authored-by: grahamc <76716+grahamc@users.noreply.github.com>
2024-11-06 21:05:00 +00:00

76 lines
3.1 KiB
YAML

name: Magic Nix Cache
branding:
icon: "box"
color: "purple"
description: "Free, no-configuration Nix cache. Cut CI time by 50% or more by caching to GitHub Actions' cache."
inputs:
use-gha-cache:
description: |
Whether to upload build results to the Github Actions cache.
Set to "no-preference" or null to have the GitHub Actions cache turn on if it is available, and FlakeHub Cache is not available (default).
Set to "enabled" or true to explicitly request the GitHub Actions Cache.
Set to "disabled" or false to explicitly disable the GitHub Actions Cache.
default: null
required: false
listen:
description: The host and port to listen on.
default: 127.0.0.1:37515
upstream-cache:
description: Your preferred upstream cache. Store paths in this store will not be cached in GitHub Actions' cache.
default: https://cache.nixos.org
diagnostic-endpoint:
description: "Diagnostic endpoint url where diagnostics and performance data is sent. To disable set this to an empty string."
default: "-"
use-flakehub:
description: |
Whether to upload build results to FlakeHub Cache.
Set to "no-preference" or null to have FlakeHub Cache turn on opportunistically (default).
Set to "enabled" or true to explicitly request FlakeHub Cache.
Set to "disabled" or false to explicitly disable FlakeHub Cache.
default: null
required: false
flakehub-cache-server:
description: "The FlakeHub binary cache server."
default: "https://cache.flakehub.com"
flakehub-api-server:
description: "The FlakeHub API server."
default: "https://api.flakehub.com"
flakehub-flake-name:
description: "The name of your flake on FlakeHub. The empty string will autodetect your FlakeHub flake."
default: ""
required: false
startup-notification-port:
description: "The port magic-nix-cache uses for daemon startup notification."
default: 41239
diff-store:
description: "Whether or not to diff the store before and after Magic Nix Cache runs"
default: false
required: false
source-binary:
description: Run a version of the cache binary from somewhere already on disk. Conflicts with all other `source-*` options.
required: false
source-branch:
description: The branch of `magic-nix-cache` to use. Conflicts with all other `source-*` options.
required: false
source-pr:
description: The PR of `magic-nix-cache` to use. Conflicts with all other `source-*` options.
required: false
source-revision:
description: The revision of `nix-magic-nix-cache` to use. Conflicts with all other `source-*` options.
required: false
source-tag:
description: The tag of `magic-nix-cache` to use. Conflicts with all other `source-*` options.
required: false
source-url:
description: A URL pointing to a `magic-nix-cache` binary. Overrides all other `source-*` options.
required: false
_internal-strict-mode:
description: Whether to fail when any errors are thrown. Used only to test the Action; do not set this in your own workflows.
required: false
default: false
runs:
using: "node20"
main: "./dist/index.js"
post: "./dist/index.js"