Skip to content

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

Closed
heartacker wants to merge 2 commits into
sourcegit-scm:developfrom
heartacker:heartacker/issue1628
Closed

feat: add Built-in parameters: DIRNAME, #1628, #1633#1653
heartacker wants to merge 2 commits into
sourcegit-scm:developfrom
heartacker:heartacker/issue1628

Conversation

@heartacker

Copy link
Copy Markdown
Contributor

No description provided.

@love-linger

Copy link
Copy Markdown
Collaborator

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

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

Copy link
Copy Markdown
ContributorAuthor

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
Copy Markdown
ContributorAuthor

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
Copy Markdown
Collaborator
DIR_NAME=$(basename `pwd`)

@heartacker

heartacker commented Aug 4, 2025

Copy link
Copy Markdown
ContributorAuthor

it can not work in action command,

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

@heartacker

heartacker commented Aug 4, 2025

Copy link
Copy Markdown
ContributorAuthor

#1629

@heartacker

Copy link
Copy Markdown
ContributorAuthor
PixPin_2025-08-04_11-20-29

@love-linger

Copy link
Copy Markdown
Collaborator

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

@love-linger

Copy link
Copy Markdown
Collaborator
imageimage

@heartacker

Copy link
Copy Markdown
ContributorAuthor

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.

@love-linger
love-lingerforce-pushed the develop branch 3 times, most recently from a39d261 to 03ab1afCompareMarch 27, 2026 03:36
@heartackerheartacker closed this by deleting the head repository May 17, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

not-plannedIt's not planned in the future

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@heartacker@love-linger@Saibamen