Commit Graph
243 Commits
Author SHA1 Message Date
Daniel Kennedy 9ed79d8596 Artifact: support downloading artifacts with CJK characters in their name (#2341)
* Artifact: support downloading artifacts with CJK characters in their name

* Fix some linting/PR comments

* One more linting fix
2026-03-11 09:30:15 -04:00
Zachary Taylor 49197ce3fe Update error message 2026-02-26 14:28:46 -05:00
Daniel Kennedy 2b2de3eaff Artifact upload: support uploading single un-zipped files (#2256)
* Artifact upload: support uploading single un-zipped files

* Fix linters

* Fix lint again

* Fix tests

* Check for 0 sized artifact lists

* Add some more stream tests and handle an upload failure gracefully

* Add CI tests for non-zipped artifacts

* Add an html report to test rendering in the browser

* Fix linting issue

* Artifact: bump the version and add release notes

* Fix Windows tests

* Fix linting

* stream: switch the error details to error type

* Refactor the validation logic in `uploadArtifact` a bit

* Added more details about how the name parameter is handled
2026-02-25 11:01:38 -05:00
Daniel KennedyandCopilot 471c2154b5 Artifact download: don't unzip non-zip artifacts (#2253)
* Download artifact: don't extract the downloaded file if the content-type isn't a zip

* Remove unused `import`

* Add support for specifying whether to skip decompressing

* Prevent path traversal attacks

* Fix indenting

* Update packages/artifact/__tests__/download-artifact.test.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Parse the mime type out of the content-type header

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fix some linting issues

* Swap `zip` for `application/zip-compressed`

* Test: negative check for malicious paths

* Increase the timeout on one of the tests

* Check the URL path for `.zip` to see if we can auto-decompress

* Fix linting issue

* Bump the package version and add release notes

* Remove `launch.json`

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-30 12:18:38 -05:00
Daniel Kennedy 0df0288961 @actions/artifact: convert to an ESM module (#2266)
* `@actions/artifact`: convert to an ESM module

* Update the package-lock.json

* Undo the GHES ignores

* Fix the reference to `@actions/http-client` in the lock file

* Bump `@actions/core` to `3.0.0`

* Remove `jest.config.cjs`

* Import `OctoKitOptions` from `@octokit/core/types`

* Pull the package version from `package.json`

* Workaround getting the package version for the user-agent

* Fix the `archiver` import

* Fix linting
2026-01-29 09:52:09 -05:00
Austen Stone fde152df4b style: wrap ACTIONS_ARTIFACT_MAX_ARTIFACT_COUNT env var assignment for readability 2025-10-22 11:42:01 -04:00
Austen Stone c08d2024bb fix: ensure max artifact count variable is treated as a string 2025-10-22 07:47:51 -04:00
Austen Stone 2d922f08cb fix: remove redundant check for max artifact count variable 2025-10-22 07:41:31 -04:00
Austen StoneandBassem Dghaidi 82e194b0fb Apply suggestion from @Link-
Co-authored-by: Bassem Dghaidi <568794+Link-@users.noreply.github.com>
2025-10-22 07:39:45 -04:00
Austen Stone a69f5c7f0c fix: resolve critical pagination bugs and add comprehensive testing
- Fix off-by-one error in pagination loop (< to <=) that prevented fetching last page
- Add Math.ceil() to maxNumberOfPages calculation for proper limit handling
- Replace hardcoded 2000 limit with configurable getMaxArtifactListCount()
- Add pagination test for multi-page artifact listing
- Add environment variable test for ACTIONS_ARTIFACT_MAX_ARTIFACT_COUNT
- Add comprehensive test coverage for getMaxArtifactListCount() function

Fixes compound bug where pagination and limit logic capped results at 900 artifacts instead of intended 1000.
2025-10-21 09:22:11 -04:00
functionstackxandCopilot 03d28f5ecf Update packages/artifact/src/internal/find/list-artifacts.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-17 18:05:06 -04:00
functionstackx 44683b6855 fix: bumping max list artifact to 2k 2025-10-16 23:13:34 -04:00
Salman Muin Kayser Chishti 767faedf93 lint 2025-10-15 17:08:33 +01:00
Salman Muin Kayser Chishti 6c4051f635 Merge remote-tracking branch 'origin/main' into salmanmkc/node24 2025-10-15 16:41:54 +01:00
Salman Muin Kayser Chishti dd8c22d213 rebase led to this changing so reverting 2025-10-15 16:37:38 +01:00
Salman Muin Kayser Chishti 5b74929b57 update with dist updates 2025-10-15 16:22:51 +01:00
Daniel Kennedy c615b29a88 Fix linting 2025-09-25 09:26:13 -04:00
Daniel Kennedy 57706d3720 Test: add a timeout test for downloading chunks from the stream 2025-09-25 09:11:38 -04:00
Andrei Kashchikhin 4261798b67 lint 2025-09-25 10:53:34 +02:00
Andrei Kashchikhin 9f7af6f342 use error in both reject and destroy 2025-09-24 17:05:25 +02:00
Andrei Kashchikhin fc83cc9f2c add reject 2025-09-01 11:52:11 +02:00
Salman Chishti 9cbe12d3a4 Merge pull request #1982 from actions/salmanmkc/obfuscate-sas
Remove logging of any SAS tokens in Actions/Cache and Actions/Artifact
2025-03-17 11:47:29 +00:00
Salman Chishti 1ad7546f62 add encoding back with extra tests 2025-03-14 06:38:57 -07:00
Salman Chishti 4899a08e7c don't need to url encode or set var 2025-03-14 06:21:41 -07:00
Salman Chishti 26ff5dd756 update ts docs 2025-03-13 04:47:49 -07:00
Salman Chishti a16f230892 PR feedback, back to simplified approach, no export on client as well 2025-03-13 04:23:45 -07:00
Salman Chishti c01a63223d Mask different situations, malformed URL, encoded, decoded, raw signatures, nested parameters, and moved to a utility file 2025-03-12 03:17:35 -07:00
Ryan Ghadimi 7cebe52bbd Update blob-upload.ts 2025-03-12 07:59:00 +00:00
Ryan Ghadimi 5c866192e7 Fix comment on expectedHash 2025-03-11 10:52:19 +00:00
Salman Chishti 2a461120c5 masks the whole URL, update tests 2025-03-10 06:47:52 -07:00
Salman Chishti 5040e42c6c Instead of using utility method in core lib, use method in both twirp clients 2025-03-07 06:01:25 -08:00
Ryan Ghadimi 88f4edace1 Merge pull request #1975 from actions/ghadimir/update_call_to_list_artifacts
Compare Artifact Digests
2025-03-07 09:51:05 +00:00
Ryan Ghadimi 8dbc929d2f Change info logs to debug logs 2025-03-07 09:38:33 +00:00
Salman Chishti d4179a3792 Add secret and signature masking for cache and artifact packages 2025-03-06 14:25:32 -08:00
Ryan Ghadimi 606384c7e9 Please the linter 2025-03-05 14:44:58 +00:00
Ryan Ghadimi 2af12f8da1 nicer wording 2025-03-05 14:35:01 +00:00
Ryan Ghadimi 0562aed3d8 Change some debug -> info for artifacts hash logging 2025-03-05 14:30:51 +00:00
Ryan Ghadimi 009c836f4c Update proto artifact interface, retrieve artifact digests, return indicator of mismatch failure 2025-03-05 11:29:44 +00:00
JoannaaKL 99f58df4aa Dont skip pages 2025-03-05 09:27:35 +00:00
Yang Cao 10daf55e23 Default upload artifacts concurrency to 5 2025-02-20 17:03:29 +00:00
Rob Herley ff2d191cdb remove runtime dependency on twirp-ts 2025-01-27 17:52:55 +00:00
Yang Cao 254e08bbb5 Rename the prefix to be more specific 2025-01-08 20:32:45 +00:00
Yang Cao 11b17a3847 Concurrency has a min of 1 2025-01-08 18:14:04 +00:00
Yang Cao f001ee669d Make concurrency change opt-in, but can only go lower 2025-01-08 18:11:38 +00:00
Yang Cao 335ec19f38 Set default concurrency to 10 and make timeout configurable 2025-01-08 16:19:09 +00:00
Brian DeHamer a1ba4fd935 return artifact digest on upload
Signed-off-by: Brian DeHamer <bdehamer@github.com>
2024-12-06 14:27:46 -08:00
Rob Herley 0e9da186e3 properly resolve relative symlinks 2024-10-08 12:35:48 -04:00
Rob Herley dc351c35a6 fix regression, auto readlink on symlinks again 2024-09-20 17:23:43 -04:00
Sébastien Morais f10277983c FIX: Set chunk timeout back to 5 minutes 2024-08-06 10:27:41 +02:00
Robin Munn 4429d9dd82 Remove unused import 2024-07-27 17:00:02 +07:00