actions / upload-artifact

MIT License
3.01k stars 683 forks source link

[bug] (main) using the @main seems to break the pipeline #495

Closed vigneshwar221B closed 5 months ago

vigneshwar221B commented 6 months ago

What happened?

While running actions/download-artifact@v3, I got the following error when I upload artifacts using the @ main version

Run actions/download-artifact@v3 Starting download for my-artifact Error: Unable to find any artifacts for the associated workflow

But when I use the @ v3 version to upload artifacts, everything works

What did you expect to happen?

To be able to download the uploaded artifacts

How can we reproduce it?

job1:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@main
      - uses: actions/upload-artifact@main
        with:
          name: my-artifact
          path: scripts/test.py

  job2:
    runs-on: ubuntu-latest
    needs: job1
    steps:
      - uses: actions/download-artifact@v3
        with:
          name: my-artifact
          path: scripts

Anything else we need to know?

I can see the uploaded artifact in the GitHub repo, so it looks like it's uploaded correctly using @ main. I just can't seem to download it. I know that it's not recommended to use @ main but I'm curious why I'm facing this issue. Thanks.

What version of the action are you using?

main

What are your runner environments?

linux

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

No response

JackCoplandGranta commented 6 months ago

This isn't a bug, the v4 version isn't compatible (in either direction) with the v3 version of the action.

robherley commented 6 months ago

👋 You should not be using @main, please use our semver releases.

And like @JackCoplandGranta mentioned, the main branch tracks against v4, which is a major release that is not compatible with v3 and below.

vigneshwar221B commented 5 months ago

Ah, that answers my question. Thanks, I'll close the issue.