-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
actions/download-artifact@v4
downloads wrong file
#2433
Comments
After investigating it a little more using #...
- uses: actions/upload-artifact@v3
with:
name: a
path: ./a
if-no-files-found: error
- uses: actions/upload-artifact@v3
with:
name: b
path: ./b
if-no-files-found: error
- uses: actions/download-artifact@v3
with:
name: b
path: ./downloaded
- run: cat downloaded/file.txt output:
|
-self-hosted
actions/download-artifact@v4
downloads wrong file on -self-hosted
I'm getting the same on: push
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Create some files
run: |
mkdir -p /some/nested/folder
echo "file1.txt" >> /some/nested/folder/file1.txt
echo "file2.txt" >> /some/nested/folder/file2.txt
mkdir -p /some/nested/folder/deeper
echo "file3.txt" >> /some/nested/folder/deeper/file3.txt
- name: Upload file1 artifact
uses: actions/upload-artifact@v4
with:
name: file1
path: /some/nested/folder/file1.txt
- name: Upload file2 artifact
uses: actions/upload-artifact@v4
with:
name: file2
path: /some/nested/folder/file2.txt
- name: Upload file3 artifact
uses: actions/upload-artifact@v4
with:
name: file3
path: /some/nested/folder/deeper/file3.txt
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: /etc/usr/artifacts
pattern: file*
merge-multiple: true
- name: Print directory structure
run: ls -R /etc/usr/artifacts
Run with: Full output:
As you can see, only |
actions/download-artifact@v4
downloads wrong file on -self-hosted
actions/download-artifact@v4
downloads wrong file
This is now the most high priority item of my backlog work starts soon. ProblemAll artifacts have the same id and downloading is using the id when merging multiple artifacts Todo find a way to provide id's from artifact name or change directory structure Then create a test to enshure this works correctly. Gitea and runner.server versions of the backend are using database id's those have been stripped away while porting |
Please test #2505, pr checks contain binaries if needed |
Bug report info
Command used with act
act -P windows=-self-hosted -j test --artifact-server-path ./artifacts
Describe issue
I've found that
actions/download-artifact@v4
can download invalid file (even tho name input parameter is specified) when running with-self-hosted
flag.If I use workflow like:
it will correctly print
b content
, however if we uncomment these lines we'll get a warning:::warning::Multiple artifacts found, defaulting to first.
because of following following response:And
cat downloaded/file.txt
will printa content
because it downloadeda
artifact not theb
artifact.Link to GitHub repository
No response
Workflow content
Relevant log output
Additional information
No response
The text was updated successfully, but these errors were encountered: