Skip to content
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

[bug] Specifying a symbolic link in the file parameter will not upload the target file anymore #589

Closed
anddani opened this issue Aug 2, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@anddani
Copy link

anddani commented Aug 2, 2024

What happened?

We are using upload-artifact to upload the result of a build step which yields a symbolic link to the actual output.

After updating to 4.3.5, our uploaded artifacts were only a handful of bytes even though the generated files are in megabytes. After downgrading to 4.3.4 it started working again.

What did you expect to happen?

We expect that when referring to a symbolic link, it should upload the file it points to, not the link itself.

How can we reproduce it?

Here is a repository to show how to reproduce this issue: https://github.com/anddani/upload-artifact-bug-repro/

Here is an example run: https://github.com/anddani/upload-artifact-bug-repro/actions/runs/10218539161

on:
  workflow_dispatch:

jobs:
  upload-artifact:
    name: Uploading file through symbolic link
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Write file
        run: |
          echo "My file" > file.txt
          ln -s file.txt symbolic-link.txt

      - name: Upload file 4.3.4
        uses: actions/[email protected]
        with:
          name: file-4-3-4.txt
          path: ./symbolic-link.txt

      - name: Upload file 4.3.5
        uses: actions/[email protected]
        with:
          name: file-4-3-5.txt
          path: ./symbolic-link.txt

Anything else we need to know?

No response

What version of the action are you using?

v4.3.5

What are your runner environments?

linux

Are you on GitHub Enterprise Server? If so, what version?

No response

@robherley
Copy link
Contributor

Hey folks, we reverted & released a new version for v4.3.6 to address the regression.

@sanjacob
Copy link

sanjacob commented Aug 15, 2024

This seems like a feature people want (as opt-in, rather than the default) #93 #508
Since it has already been added by accident, it would be nice to have it as an option.

Edit: after testing it seems not all symlinks are kept as such

@robherley
Copy link
Contributor

Going to close this, we've addressed the symlink changes in recent updates.

Similar:

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