Rename a file if it exists.
Common parameters are described in Common parameters.
string
): Full path to the file to rename.string
): New name (including path) for the file.None.
GitHub Action inputs are provided in snake_case
, while CLI parameters use PascalCase
. The table below maps each input to its corresponding CLI parameter. For details on shared CLI flags, see Common parameters.
Input | CLI parameter | Description |
---|---|---|
current_filename |
CurrentFilename |
Existing file name. |
new_filename |
NewFilename |
New file name. |
gcli_path |
gcliPath |
Optional path to the g-cli executable. |
working_directory |
WorkingDirectory |
Base directory for the action; relative paths are resolved from here. |
log_level |
LogLevel |
Verbosity level (ERROR|WARN|INFO|DEBUG). |
dry_run |
DryRun |
If true, simulate the action without side effects. |
pwsh -File actions/Invoke-OSAction.ps1 -ActionName rename-file -ArgsJson '{
"CurrentFilename": "C:/path/lv_icon.lvlibp",
"NewFilename": "lv_icon_x64_v1.0.0.1+gabcdef.lvlibp"
}'
- name: Rename file
uses: LabVIEW-Community-CI-CD/open-source/rename-file@v1
with:
current_filename: 'C:/path/lv_icon.lvlibp'
new_filename: 'lv_icon_x64_v1.0.0.1+gabcdef.lvlibp'
0
– file renamed successfullyFor troubleshooting tips, see the troubleshooting guide.