Skip to content

[feat req] path doesn't take variables into account #680

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
SetTrend opened this issue Mar 12, 2025 · 4 comments
Open

[feat req] path doesn't take variables into account #680

SetTrend opened this issue Mar 12, 2025 · 4 comments
Labels
bug Something isn't working

Comments

@SetTrend
Copy link

SetTrend commented Mar 12, 2025

What happened?

I'm trying to upload a .NET project artifact. The artifact is stored at $GITHUB_WORKSPACE/ProjectName/bin/Release/net9.0-windows/

However, actions/puload-artifact@4 doesn't seem to resolve the variable I used to address this directory:

Image

What did you expect to happen?

I'd expect actions/puload-artifact@4 to resolve variables, glob patterns and relative paths, and to output the resolved absolute paths prior to uploading, so the actual absolute paths used can be evaluated by the user.

How can we reproduce it?

This is the GitHub Actions step I wrote:

- name: Uploading artifacts
  uses: actions/upload-artifact@v4
  with:
    name: Build result
    path: $GITHUB_WORKSPACE/ProjectName/bin/Release/net9.0-windows/
    overwrite: true
    if-no-files-found: error

What version of the action are you using?

@4

What are your runner environments?

linux or windows – didn't specify

@SetTrend SetTrend added the bug Something isn't working label Mar 12, 2025
@SetTrend SetTrend changed the title [bug] path doesn't take variables into account [feat req] path doesn't take variables into account Mar 13, 2025
@kdewald
Copy link

kdewald commented Apr 5, 2025

Seeing this same issue. Are there any workarounds?

@yacaovsnc
Copy link
Contributor

You can use ${{ github.workspace }} instead:

e.g.:

    - uses: actions/upload-artifact@v4
      with:
        name: artifact
        path: ${{ github.workspace }}/artifact

@kdewald
Copy link

kdewald commented Apr 16, 2025

You can use ${{ github.workspace }} instead:

e.g.:

    - uses: actions/upload-artifact@v4
      with:
        name: artifact
        path: ${{ github.workspace }}/artifact

It's not the same. Sometimes ${{ github.workspace }} and $GITHUB_WORKSPACE don't match in all environments.

@SetTrend
Copy link
Author

/ref: actions/runner#2058

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants