Skip to content

[bug] archive: false warns when uploading zero-byte file #777

@mikeharder

Description

@mikeharder

What happened?

When uploading a zero-byte file with archive: false, a warning is written, even if the upload was successful:

Beginning upload of artifact content to blob storage
Finished uploading artifact content to blob storage!
SHA256 digest of uploaded artifact is e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
Warning: No data was uploaded to blob storage. Reported upload byte count is 0.
Finalizing artifact upload

Related issue in actions/toolkit:

What did you expect to happen?

No warning, or the ability to disable the warning

How can we reproduce it?

- run: truncate -s 0 zero.txt

- uses: actions/upload-artifact@v7
  with:
    name: zero-true
    path: zero.txt
    archive: true

- uses: actions/upload-artifact@v7
  with:
    name: zero-false
    path: zero.txt
    archive: false

Anything else we need to know?

No response

What version of the action are you using?

v7

What are your runner environments?

linux

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

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions