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

[feat req] Ability to upload multiple artifacts #331

Open
mih-kopylov opened this issue Jun 19, 2022 · 13 comments
Open

[feat req] Ability to upload multiple artifacts #331

mih-kopylov opened this issue Jun 19, 2022 · 13 comments
Labels
enhancement New feature or request

Comments

@mih-kopylov
Copy link

mih-kopylov commented Jun 19, 2022

What would you like to be added?

When building a go application for multiple platforms, I would like to upload the built artifacts as separate files, like this:

  • app_darwin_amd64
  • app_freebsd_amd64
  • app_linux_amd64
  • app_windows_amd64.exe

Why is this needed?

Right now I have to duplicate the following action call for each binary, and that's not convenient at all.

      - name: Upload built artifacts
        uses: actions/upload-artifact@v3
        with:
          name: app_darwin_amd64
          path: ./app_darwin_amd64

Keeping all binaries in a single zip file is also not convenient because it requires downloading all binaries at once, while I need only a single one

@mih-kopylov mih-kopylov added the enhancement New feature or request label Jun 19, 2022
@retorquere
Copy link

Doesn't this work for you?

      - name: Upload built artifacts
        uses: actions/upload-artifact@v3
        with:
          name: app_darwin_amd64
          path: |
            ./app_darwin_amd64
            ./app_freebsd_amd64

@mih-kopylov
Copy link
Author

@retorquere that will create a single archive with these binaries, right?
But I'd like to have separate archives for each binary

@petertiedemann
Copy link

We are having a similar problem, just with even more artifacts.

@Bongani
Copy link

Bongani commented Aug 9, 2022

Seems this PR has the change to do it, but you can see progress has been stalled for awhile. You could fork the changes and fix the merge issue.

#205

@initdc
Copy link

initdc commented Oct 17, 2022

#354

@vignesh-gupta-xom
Copy link

Hey Guys, Any updates on this?

@troman29
Copy link

I support, we need such a function.

kenorb added a commit to EA31337/ansible-role-metatrader that referenced this issue Feb 11, 2024
@AndyBoWu
Copy link

AndyBoWu commented Apr 2, 2024

Simply do

  - name: Upload Test Results
    uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
    with:
      name: a-test-reports
      path: |
        ./playwright-report-a/index.html

  - name: Upload Test Results
    uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
    with:
      name: b-test-reports
      path: |
        ./playwright-report-b/index.html

@infogulch
Copy link

I have half a dozen artifacts that I'm dumping into a new directory, and the list may expand as I build binaries for new platforms. It would be nice if I could upload all of them as individual artifacts without having to repeat the action six or more times and manually maintain the list to match the number of files.

@AndyBoWu
Copy link

AndyBoWu commented Apr 6, 2024

I have half a dozen artifacts that I'm dumping into a new directory, and the list may expand as I build binaries for new platforms. It would be nice if I could upload all of them as individual artifacts without having to repeat the action six or more times and manually maintain the list to match the number of files.

doable with some support of bash script and regex I think

@infogulch
Copy link

doable with some support of bash script and regex I think

You can invoke actions from bash?

@AndyBoWu
Copy link

AndyBoWu commented Apr 6, 2024

doable with some support of bash script and regex I think

You can invoke actions from bash?

the other way around, call a customized bash script to reconstruct whatever files/artifacts you need, then output the names and pass to the following jobs.

@infogulch
Copy link

My goal is to publish the artifacts for humans to download individually, not to consume in a later job. On release these files are published as release assets, but I'd like them to be temporarily available for all builds not just releases.

Your question prompted me to consider why using the action is required at all. Since actions don't have special access to anything in the job runner, it should be possible to recreate the steps used by actions to upload artifacts to azure blob storage manually in principle, perhaps using az.

What follows is a trace of how upload-artifact actually works:

There are some setup and cleanup functions in there which are probably required to get it to work, but I don't see why this isn't possible to replicate in shell. -50MB of javascript to upload a file? 👍

I got bored before I got any farther, but I guess the next step would be to figure out exactly how it gets a signed azure blob upload url.

@police999a police999a mentioned this issue Apr 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

9 participants