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

Open source this action #7

Closed
eine opened this issue Sep 5, 2019 · 11 comments
Closed

Open source this action #7

eine opened this issue Sep 5, 2019 · 11 comments
Assignees
Labels
v2-preview Available or fixed in the v2-preview
Milestone

Comments

@eine
Copy link

eine commented Sep 5, 2019

It is surprising that this repo (the scripts and documentation in this project) is licensed under MIT, since there is little to no relevant content to be licensed. However, I'm concerned about this from a practical point of view. I believe that most of the currently open issues (specially #3) could be fixed by the community, should we have any code to look at. It'd be really useful if the glue logic that gathers the artifacts and names them was open sourced, along with some minimal docs about the backend API that this action is using.

@matkoch
Copy link

matkoch commented Sep 21, 2019

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

False alert :|

@tedmiston
Copy link

tedmiston commented Oct 29, 2019

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.

@madhurig
Copy link

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

@madhurig madhurig self-assigned this Oct 30, 2019
@joshmgross
Copy link
Member

@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

@konradpabjan
Copy link
Collaborator

konradpabjan commented Dec 16, 2019

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 ❤

@konradpabjan
Copy link
Collaborator

konradpabjan commented Dec 23, 2019

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.

@eine
Copy link
Author

eine commented Dec 24, 2019

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?

@konradpabjan
Copy link
Collaborator

konradpabjan commented Dec 26, 2019

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.

@tysonite
Copy link

tysonite commented Jan 2, 2020

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.

ryan-kraay added a commit to ryan-kraay/k3.5s that referenced this issue Jan 3, 2020
It appears it's not possible retain the execution permission, until mid-January
actions/upload-artifact#7 (comment)
@konradpabjan
Copy link
Collaborator

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

@konradpabjan konradpabjan added v2-preview Available or fixed in the v2-preview and removed Status:In-Progress Currently being worked on labels Mar 13, 2020
@konradpabjan
Copy link
Collaborator

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.

@konradpabjan konradpabjan unpinned this issue Apr 28, 2020
ryan-kraay added a commit to ryan-kraay/k3.5s that referenced this issue May 1, 2020
* Extract k3s from docker image and publish it

* Merge build+extract into single step

* Remove k3s/ from artifact

It appears it's not possible retain the execution permission, until mid-January
actions/upload-artifact#7 (comment)

* Re-add path as it's necessary

* Add dockerignore

* Attempt to rename k3s/ to bin/

* Create k3s-bin/k3s artifact

* Update to k3s to v1.17.4+k3s1

* Change upload-artifact to v2

* Attempt to remove zip file

* Update default version in README

* Increase upload-artifact to v2

* Add artifact name and set executed permission
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v2-preview Available or fixed in the v2-preview
Projects
None yet
Development

No branches or pull requests

7 participants