Skip to content

feat: add Built-in parameters: DIRNAME, #1628, #1633 #1653

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

heartacker
Copy link
Contributor

No description provided.

@heartacker heartacker force-pushed the heartacker/issue1628 branch 3 times, most recently from cfc9c61 to 014de49 Compare August 4, 2025 02:14
@love-linger
Copy link
Collaborator

You should use working directory of the custom action's process, which is always the path of repository

@love-linger love-linger self-assigned this Aug 4, 2025
@love-linger love-linger added the not-planned It's not planned in the future label Aug 4, 2025
@heartacker
Copy link
Contributor Author

we just want the folder name,
the folder name is fix and part of path,
dirname remains unchanged, just like path, and we also need to use dirname for better processing
please

@heartacker
Copy link
Contributor Author

I know the path is fixed, but I only need the name of the folder. And this folder is fixed just like the path, which is very useful for custom processing. I need to get the name of the folder instead of the name of the path

@love-linger
Copy link
Collaborator

DIR_NAME=$(basename `pwd`)

@heartacker
Copy link
Contributor Author

heartacker commented Aug 4, 2025

it can not work in action command,

DIR_NAME=$(basename `pwd`)
PixPin_2025-08-04_10-52-40

@heartacker
Copy link
Contributor Author

heartacker commented Aug 4, 2025

#1629

@heartacker
Copy link
Contributor Author

PixPin_2025-08-04_11-20-29

@love-linger
Copy link
Collaborator

It's a shell expr. You should use echo "$(basename `pwd`)"

@love-linger
Copy link
Collaborator

image image

@heartacker
Copy link
Contributor Author

That is to say, even for further customized requirements, even if they are simple, I have to use the shell. Moreover, under different operating systems, such as Linux or Windows, I also have to write specific and different commands for the operating systems to achieve the same function.

@heartacker heartacker force-pushed the heartacker/issue1628 branch from 014de49 to 018f050 Compare August 4, 2025 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not-planned It's not planned in the future
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants