Commit graph

28 commits

Author SHA1 Message Date
Pedro Piñera Buendía
0f242c8c39
feat: add environment variable support to cache key templates (#250)
I added support for customizing the key, but forgot the most important
piece that we need, being able to reference an environment variable
value. Our CI runner provider is now exposing an environment variable
that indicates if the OS configuration changes, and we plan to use that
one to invalidate the cache, otherwise we get errors because the cached
dependencies are linking against an invalid / non-existent `glibc`
version.

> [!IMPORTANT]
> I wrote the code with `claude code` and reviewed it afterwards

## Summary (Claude-generated)
- Add support for `{{env.VAR_NAME}}` syntax in cache key templates to
allow reading environment variable values
- Enables more flexible cache key customization based on CI/CD
environment variables like branch names, deployment environments, or
custom build identifiers
- Maintains backward compatibility with existing cache key templates

## Examples
```yaml
# Include branch name from environment
cache_key: 'mise-{{env.GITHUB_REF_NAME}}-{{platform}}-{{file_hash}}'

# Use custom deployment environment
cache_key: 'mise-{{env.DEPLOY_ENV}}-{{platform}}-{{file_hash}}'

# Conditional logic with environment variables
cache_key: '{{default}}{{#if env.CUSTOM_SUFFIX}}-{{env.CUSTOM_SUFFIX}}{{/if}}'
```

## Changes
- Modified `processCacheKeyTemplate()` in `src/index.ts` to include
`process.env` in template data
- Updated `action.yml` documentation to include the new
`{{env.VAR_NAME}}` syntax
- All existing functionality remains unchanged

## Test plan
- [x] Build and package successfully with `npm run all`
- [x] Linting and formatting pass
- [ ] Manual testing with environment variables in cache key templates
- [ ] Verify backward compatibility with existing cache key
configurations
2025-08-22 05:04:00 -05:00
Pedro Piñera Buendía
d53c31b046
feat: add configurable cache key with template variable support (#246)
I closed [this PR](https://github.com/jdx/mise-action/pull/235) by
mistake so I'm reopening it.
2025-08-19 10:59:36 -05:00
Mael
f0b1d70eae
feat: export env vars from mise.toml (#241)
Solve https://github.com/jdx/mise-action/issues/36

BREAKING CHANGE: we're defaulting this behavior to `true`

---------

Co-authored-by: jdx <216188+jdx@users.noreply.github.com>
2025-08-18 16:33:13 +00:00
jdx
adbb7adcf1
feat: allow fetching binary from mise.jdx.dev (#227)
THANKS CLOUDFLARE FOR PROJECT ALEXANDRIA
2025-07-24 06:09:13 +00:00
Gregor Zeitlinger
ca07392817
support checksum (#218)
* support checksum

* support checksum

* support checksum

* support checksum

* support checksum

* support checksum

* support checksum

* support checksum

* support checksum

* support checksum

* support checksum

* support checksum

* support checksum

* support checksum

* support checksum

* support checksum

* support checksum

* support checksum

* support checksum

* support checksum
2025-07-12 06:17:19 -05:00
Mate Molnar
d24e3836a6
feat: pass github token for mise calls (#205) 2025-06-25 07:20:55 -05:00
Andrew Driggs
883a83c54f
Add reshim flag to reshim after setup (#202) 2025-06-17 02:03:19 -05:00
jdx
81d53cf968
fix: save cache when build fails
Fixes #99
2025-04-22 22:41:39 -05:00
Jeff Dickey
2e6a26bb55
fix: deprecated install_dir 2024-06-01 11:12:06 -05:00
jdx
5f5bc9d57c
feat: allow passing args to install (#87) 2024-06-01 11:10:28 -05:00
Jeff Dickey
4541e25ef8
fix: rename "install_dir" config to "working_directory"
This fits in better with other actions
2024-06-01 10:37:21 -05:00
Jeff Dickey
b42d5a2f42
feat: added log level config 2024-05-12 10:19:03 -05:00
Jeff Dickey
2c307d8ed6
rtx -> mise 2024-01-02 16:16:49 -06:00
Pedro Piñera Buendía
10161a135f
Add API to enable the experimental features (#220)
* Add option to enable experimental features

* Add .rtx.toml to install the tools necessary to work on this repository
2023-12-24 19:15:25 +00:00
jdx
55e5d18e74
added rtx_dir config (#215)
* added rtx_dir config

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip
2023-12-14 08:38:00 -06:00
jdx
5ac46849ac
added rtx_toml support (#214)
* added rtx_toml support

Fixes #47

* refactor

* refactor

* bump

* bump

* bump
2023-12-14 07:56:58 -06:00
jdx
a545a9b90a
pinning (#213)
* pinning

Fixes #205

* gh

* gh

* gh

* gh

* docs
2023-12-14 12:39:54 +00:00
Robbie Plankenhorn
0e7059cb40
Added ability to disable automatic action caching. (#212) 2023-12-12 15:04:07 -06:00
jdx
d661017ade
updated action template base from actions/typescript-action (#170) 2023-10-16 19:18:57 -05:00
Yuya Kusakabe
50bd58fbe0
Add install option to skip rtx install (#146) 2023-09-15 00:49:51 +00:00
Jeff Dickey
ae8876954e
jdxcode -> jdx 2023-08-27 12:12:44 -05:00
Yousif Akbar
10114e7e8a
Adding Setting of Necessary Environment Variables Before Running rtx (#123)
* Fixing typo in outputs of action.yml

* Adding `setEnvVars` step for env vars that should always be set in the action
2023-08-18 15:29:16 +00:00
Nick Hehr
801b2f548d
feat: add support for saving / restoring rtx cache (#64)
* feat: add support for saving / restoring rtx cache

* fix: add support for .rtx.toml to file hash
2023-04-11 00:36:00 +00:00
Jeff Dickey
466110084b change action name 2023-02-21 23:52:09 -06:00
Jeff Dickey
7a0340b0dc branding 2023-02-21 23:26:41 -06:00
Jeff Dickey
386756bf18
Update action.yml 2023-02-21 23:25:27 -06:00
Jeff Dickey
67b1e31166 init 2023-01-14 08:36:43 -06:00
Jeff Dickey
35f6329d75
Initial commit 2023-01-14 08:11:40 -06:00