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

Allow to download staging releases of buildx #98

Closed
wants to merge 1 commit into from

Conversation

crazy-max
Copy link
Member

Would allow to download an artifact from a specified pull request or runID from docker/buildx repo for testing purposes.

To do this, you need to define a special prefix in the version input to lift this feature:

      -
        uses: docker/setup-buildx-action@v1
        with:
          version: pr-645

Will download the generated artifact by docker/buildx#645 if the build.yml workflow is completed.

You can also directly specify a runID like 986572944:

      -
        uses: docker/setup-buildx-action@v1
        with:
          version: runid-986572944

Need some tests before merging.

cc @tonistiigi

Signed-off-by: CrazyMax crazy-max@users.noreply.github.com

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
@codecov-commenter
Copy link

Codecov Report

Merging #98 (3b5c478) into master (a1c666d) will decrease coverage by 10.33%.
The diff coverage is 37.03%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master      #98       +/-   ##
===========================================
- Coverage   71.53%   61.20%   -10.34%     
===========================================
  Files           3        3               
  Lines         130      183       +53     
  Branches       22       27        +5     
===========================================
+ Hits           93      112       +19     
- Misses         28       57       +29     
- Partials        9       14        +5     
Impacted Files Coverage Δ
src/buildx.ts 64.10% <33.33%> (-3.83%) ⬇️
src/github.ts 43.90% <36.11%> (-56.10%) ⬇️
src/context.ts 76.00% <50.00%> (-8.22%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a1c666d...3b5c478. Read the comment docs.

@tonistiigi
Copy link
Member

iiuc this pulls the buildx.zip from the workflow run in buildx repo. The problems with that are that this zip is huge and contains all platforms and afaics these artifacts are not there forever but github cleans them up based on repo configuration. I know even with cleanup we already use at least tens of GB to store them. As this would make the user workflow break at an arbitrary time I don't think anyone should use them.

Maybe if you really want to use any commit buildx can be built directly. Or I guess you were thinking about storing these artifacts in docker images.

@crazy-max
Copy link
Member Author

iiuc this pulls the buildx.zip from the workflow run in buildx repo. The problems with that are that this zip is huge and contains all platforms

Yes we can't download a per-platform artifact atm as everything is bundled in a single archive (actions/upload-artifact#138).

afaics these artifacts are not there forever but github cleans them up based on repo configuration.

Yes it is. The purpose of this design is to be used for testing purpose but agree that breaking their workflow is not smth we want.

Maybe if you really want to use any commit buildx can be built directly. Or I guess you were thinking about storing these artifacts in docker images.

Yes now that we have our buildx-bin repo on Docker Hub I think I will use the Docker image. I also encounter an issue with the current impl. The GITHUB_TOKEN to download the artifact through their API would only work for collaborators/members in docker/buildx repo...

@initdc
Copy link

initdc commented Oct 17, 2022

I made a feat of upload artifact per file
see actions/upload-artifact#354

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants