mirror of
https://github.com/actions/upload-artifact.git
synced 2025-06-29 20:34:16 +00:00
fix: add path key for pathObject
This commit is contained in:
parent
7f0c9eaa6d
commit
bbe4504729
4 changed files with 55 additions and 25 deletions
11
action.yml
11
action.yml
|
@ -28,25 +28,28 @@ inputs:
|
|||
default: "false"
|
||||
artifact-name-rule:
|
||||
description: >
|
||||
https://nodejs.org/docs/latest-v16.x/api/path.html#pathparsepath
|
||||
// https://nodejs.org/docs/latest-v16.x/api/path.html#pathparsepath
|
||||
// Modified from path.parse()
|
||||
|
||||
path.parse('/home/user/dir/file.txt');
|
||||
// Returns:
|
||||
// { root: '/',
|
||||
// dir: '/home/user/dir',
|
||||
// path: 'home/user/dir'
|
||||
// base: 'file.txt',
|
||||
// ext: '.txt',
|
||||
// name: 'file' }
|
||||
|
||||
┌─────────────────────┬────────────┐
|
||||
│ dir │ base │
|
||||
├──────┬ ├──────┬─────┤
|
||||
│ root │ │ name │ ext │
|
||||
│ dir sep base │
|
||||
├──────┬──────────────┼──────┬─────┤
|
||||
│ root │ path │ name │ ext │
|
||||
" / home/user/dir / file .txt "
|
||||
└──────┴──────────────┴──────┴─────┘
|
||||
(All spaces in the "" line should be ignored. They are purely for formatting.)
|
||||
|
||||
Every key need in wrapper: ${}
|
||||
sep just for prompt, can't be used
|
||||
default: ${base}
|
||||
runs:
|
||||
using: 'node16'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue