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

Provide a workflow command to upload an artifact so we can upload artifacts inside other actions #105

Closed
TravisEz13 opened this issue Jul 28, 2020 · 5 comments

Comments

@TravisEz13
Copy link

TravisEz13 commented Jul 28, 2020

I don't see one in the list here:
https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions

@TravisEz13 TravisEz13 added the bug Something isn't working label Jul 28, 2020
@konradpabjan konradpabjan removed the bug Something isn't working label Jul 29, 2020
@konradpabjan
Copy link
Collaborator

konradpabjan commented Jul 29, 2020

If you want to upload artifacts in other actions, you can use the @actions/artifact NPM package 😃 https://github.com/actions/toolkit/tree/main/packages/artifact

This action is effectively just a wrapper for the package. The core upload logic alongside all the necessary API calls are all taken care of inside there. This package was created specifically so that action authors could more easily work with artifacts. In terms of adding a command, we do not plan on adding support for that.

@TravisEz13
Copy link
Author

TravisEz13 commented Jul 29, 2020

We are trying to write actions in PowerShell. Calling back into node is painful. Would that even work?

@konradpabjan
Copy link
Collaborator

konradpabjan commented Jul 30, 2020

You can call the node package in a shell script using something like this. I do not recommend this hack in any way 😄

There is however a problem though because certain env variables are only available in the node context (the context is this thing when you author actions). We get around this by running a local action here (another hack just so we could get some CI working). So if you're dealing with pure powershell, it most likely will not work. Some more info here.

We have a feature on the horizon though might be able to help you out: actions/runner#438

@TravisEz13
Copy link
Author

The composable actions seems like a better option

@konradpabjan
Copy link
Collaborator

Composite actions have shipped! https://github.blog/changelog/2020-08-07-github-actions-composite-run-steps/

Going to close out this issue now

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

No branches or pull requests

2 participants