Commit graph

83 commits

Author SHA1 Message Date
jdx
5e785b73cb
fix: redact secret values from env (#252) 2025-08-22 09:38:59 -05:00
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
jdx
1dfcbbcb60
chore: updated deps (#244) 2025-08-18 16:54:15 +00: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
Andrew Driggs
b64166e6f5
Fix flag passed to mise reshim (#208)
* Fix flag passed to `mise reshim`

* chore: update dist after build
2025-07-15 17:30:41 -07:00
jdx
af4b5b2b4b
chore: updated deps (#219) 2025-07-12 06:23:29 -05: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
jdx
233d283dd6
Revert "add all MISE_ env vars to cache key (#197)"
This reverts commit a5b33d7b88.
2025-06-25 11:54:34 -05:00
jdx
7e5e321e56
chore: updated deps 2025-06-25 07:22:29 -05:00
Mate Molnar
d24e3836a6
feat: pass github token for mise calls (#205) 2025-06-25 07:20:55 -05:00
jdx
ec352a8916
chore: node-24 2025-06-17 12:12:32 -05:00
Gregor Zeitlinger
a5b33d7b88
add all MISE_ env vars to cache key (#197)
Co-authored-by: jdx <216188+jdx@users.noreply.github.com>
2025-06-17 17:12:06 +00:00
Andrew Driggs
883a83c54f
Add reshim flag to reshim after setup (#202) 2025-06-17 02:03:19 -05:00
jdx
13abe502c3
2.2.3 2025-05-26 19:13:20 -05:00
Prashant V
367a97c7a9
Add MISE_ENV to cache key if set (#196)
Fixes #169
2025-05-26 19:13:00 -05:00
jdx
69bf3f1a1f
chore: updated deps 2025-05-12 07:16:35 -05:00
Victor LEFEBVRE
923c9f44ed
Fix alpine container installation (#189)
* Change test tool for future alpine CI testing

* replace node with jq as it doesnt require any build on alpine

* Fix alpine musl container install

* add tests around mise install in alpine container

* add support for musl os
Fixes: https://github.com/jdx/mise-action/issues/186

* alpine needs bash to run test.sh script

* remove unneeded logs

* Update test.yml

* Update test.yml
2025-05-12 07:15:17 -05:00
jdx
4a07a7ced0
fix: show message when saving cache 2025-04-22 22:54:30 -05:00
jdx
81d53cf968
fix: save cache when build fails
Fixes #99
2025-04-22 22:41:39 -05:00
jdx
ff329b72ac
chore: updated deps 2025-04-22 22:25:08 -05:00
Ville Skyttä
5e190f2e46
feat: run mise ls (#163) 2025-01-05 18:43:06 +00:00
jdx
b82835fe1f
fix: use tar.gz if zstd is not available (#159)
Fixes #155
2024-12-30 16:44:25 +00:00
jdx
2408f570e1
chore: use github releases (#154) 2024-12-23 13:59:01 -06:00
jdx
370e73c4f0
feat: fetch tarball with zst compression (#153) 2024-12-23 19:31:53 +00:00
jdx
3601336acb
chore: updated deps 2024-12-13 06:03:07 -06:00
jdx
52c535ffc8
chore: updated deps 2024-11-27 18:10:51 -06:00
jdx
793f8df484
chore: added pre-commit task 2024-11-18 13:24:06 -06:00
Risu
2d33c855a3
fix: fix cache_save option (#144) 2024-11-18 13:20:21 -06:00
Frederik Boster
7b77be967a
fix: use correct glob format for cache key file hash (#139) 2024-11-06 14:43:47 +00:00
jdx
239a5da37c
chore: update deps 2024-11-04 10:28:30 -06:00
jdx
57eda1a45f
fix: use lockfile for cache key 2024-11-04 10:26:21 -06:00
Maximilian Remming
fb230aa558
fix: overwrite MISE_LOG_LEVEL when in debug mode (#138)
As the log_level parameter defaults to info the MISE_LOG_LEVEL
environment variable needs to be overriden or otherwise it is not set.
This also means that mise-action will always run with debug logging when
it is ran with debugging enabled, no matter what log level the user has
set.
2024-10-29 07:08:34 -05:00
Jeff Dickey
86b003e69f
chore: fetch mise compressed 2024-10-27 20:20:20 -05:00
Jeff Dickey
c20c9ebb8b
chore: fetch mise compressed 2024-10-27 20:18:38 -05:00
Risu
f2a7466821
fix: add install_args hash to cache key (#136)
* fix: add install_args hash to cache key

* fix: sort tools before hashing
2024-10-26 06:25:44 -05:00
Maximilian Remming
cc7f0e6690
feat: use debug logging when in debug mode (#128) (#129)
* feat: use debug logging when in debug mode (#128)

* chore: remove unnecessary getExperimental function

* chore: fix setupMise typing

As `core.getInput` returns always a string, the type of `version` in
`setupMise` should be just a `string`. When the string is empty it means
to use the latest version. This could be made cleaner but this is how it
works.

* feat: only set MISE_LOG_LEVEL when required

Previously MISE_LOG_LEVEL was always set, even when log_level parameter
wasn't configured. This changes that behaviour so that the environment
variable is only set when log_level is set by the user and that the
MISE_LOG_LEVEL is set to debug only for this action when in debug mode.

---------

Co-authored-by: Jeff Dickey <216188+jdx@users.noreply.github.com>
2024-10-25 16:48:49 +00:00
jdx
477762426f
fix: cache_save boolean bug (#135)
Fixes #130
2024-10-25 14:03:09 +00:00
jdx
1b7ab9b9c1
fix: cache mise bin (#134)
Fixes #133
2024-10-24 01:27:00 +00:00
jdx
5d3e058edf
feat: support windows (#122) 2024-09-25 21:27:52 +00:00
renovate[bot]
bd6a003a27
chore(deps): lock file maintenance (#102)
* chore(deps): lock file maintenance

* rebuild

* rebuild

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jeff Dickey <216188+jdx@users.noreply.github.com>
2024-07-29 18:40:29 +00:00
Jeff Dickey
da1c427f6e
chore: husky deprecation 2024-07-29 12:34:33 -05:00
Jeff Dickey
227736a40e
chore: automatically rebuild with renovate 2024-07-29 12:25:18 -05:00
Jeff Dickey
d0dc8c81e3
chore: rebuild 2024-06-01 17:32:37 -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
0f558f87e1
chore(eslint): updated eslint@8 2024-04-12 20:30:20 -05:00
jdx
d6a9bdcb65
chore: npm update (#61) 2024-03-29 20:38:44 -05:00