Code Monkey home page Code Monkey logo

Comments (11)

konradpabjan avatar konradpabjan commented on July 27, 2024 27

Sharing an update regarding open-sourcing this action

Sometime around mid-January mid-February we're planning on releasing a v2-beta version of this action. It will be fully open-sourced and written with Node + TypeScript (similar to our other actions such as actions/cache).

Currently this action is a plugin on the runner where it has some extra permissions to do certain things. The majority of the work being done for open-sourcing this involves creating new APIs that will be able to interact with artifacts without being tightly-coupled with the runner. A new open-sourced NPM package will be created that will consume/interact with these APIs (similar to what we have for @actions/core or @actions/io). Both upload-artifact and download-artifact will use this new package.

A lot of the top-requested issues/requests will be addressed such as #11 and #3.

More information and specifics will be shared right around the launch of the v2-beta version. Thank you everyone for your patience ❤

from upload-artifact.

madhurig avatar madhurig commented on July 27, 2024 19

We are working towards this, our goal is for the community to be able to contribute fixes.

from upload-artifact.

konradpabjan avatar konradpabjan commented on July 27, 2024 4

Our runner was recently open-sourced. You can find all of the current code for v1 that is specific to upload-artifact and download-artifact here: https://github.com/actions/runner/tree/master/src/Runner.Plugins/Artifact

Note: All the artifact code in the runner will eventually be removed once v2 is released and v1 becomes deprecated. The code is all currently tied to the runner because there are some env variables that are only available to the runner (you cannot access these from an action). These env variables are used to make the necessary API calls.

from upload-artifact.

konradpabjan avatar konradpabjan commented on July 27, 2024 3

Will that code be moved to this repo when it is removed from there?

The code will be split between this repo and a new one we are creating for the upcoming npm package. This action (along with download-artifact) will use the new package to make all of the necessary API calls. The new repo for the npm package will be open-sourced from the very beginning so most of the code will go there, anything else will end up here.

from upload-artifact.

konradpabjan avatar konradpabjan commented on July 27, 2024 2

The v2-preview is ready to go. We would love to get feedback!

The core functionality to interact with artifacts can be found in the @actions/artifact package (this was setup so that it is easier for action builders to interact with artifacts)
https://www.npmjs.com/package/@actions/artifact
https://github.com/actions/toolkit/tree/master/packages/artifact

This action now also uses @actions/glob for things like wildcards and search:
https://www.npmjs.com/package/@actions/glob
https://github.com/actions/toolkit/tree/master/packages/glob

Everything else is in this repo 😀 Moving forward it will be much easier to accept contributions and feedback once the preview is over.

see: #62

from upload-artifact.

konradpabjan avatar konradpabjan commented on July 27, 2024 2

v2 upload artifact has been released! https://github.blog/changelog/2020-04-28-github-actions-v2-artifact-actions/

You can now use it by using actions/upload-artifact@v2 and all the source code is in the master branch.

You can find all the core upload logic here or in the @actions/artifact npm package. https://github.com/actions/toolkit/tree/master/packages/artifact

Artifact upload is now like a traditional typescript action and is no longer coupled to the runner. Moving forward it should be much easier to accept contributions and to add new features.

from upload-artifact.

tedmiston avatar tedmiston commented on July 27, 2024 1

I also came looking for the source to see if upload-artifact supports me passing a command that returns a file path for the path input (e.g., yarn cache dir).

Update: It does not.

from upload-artifact.

matkoch avatar matkoch commented on July 27, 2024

I guess it's here: https://github.com/skx/github-action-publish-binaries

False alert :|

from upload-artifact.

joshmgross avatar joshmgross commented on July 27, 2024

@tedmiston You can use Action Outputs to do that, something like:

- name: Get yarn cache
  id: yarn-cache
  run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/upload-artifact@v1
  with:
    path: ${{ steps.yarn-cache.outputs.dir }}

https://help.github.com/en/actions/automating-your-workflow-with-github-actions/metadata-syntax-for-github-actions#outputs

Though for that specific case, you probably want to use actions/cache instead

from upload-artifact.

eine avatar eine commented on July 27, 2024

All the artifact code in the runner will eventually be removed once v2 is released and v1 becomes deprecated.

Will that code be moved to this repo when it is removed from there?

from upload-artifact.

tysonite avatar tysonite commented on July 27, 2024

Hope #14 will be also addressed in upcoming release as we forced to upload HTML pages to external host and there is no smart way to reference this data in embedded github checks - means need to looks throught stdout of step to find out a link.

from upload-artifact.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.