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

is there a way to copy an artifact into the image #123

Open
dbieber opened this issue Dec 3, 2024 · 2 comments
Open

is there a way to copy an artifact into the image #123

dbieber opened this issue Dec 3, 2024 · 2 comments

Comments

@dbieber
Copy link

dbieber commented Dec 3, 2024

I have a build process that builds some js with webpack (outside of my image), which I'd like to copy into the arm image.
How can I do this?


I see there are options for copying out of the image after commands has run (copy_artifact_path and copy_artifact_dest), but I don't see any options for copying things (other than the repo itself) into the image. And I don't see a way to do so from within commands either, since that runs in the image, and I don't know how to copy from outside the image into the image from there.

@dbieber
Copy link
Author

dbieber commented Dec 4, 2024

It looks like I could enable this by adding commands similar to

sudo cp -Rp ${{ github.workspace }} ${{ steps.mount_image.outputs.mount }}${repository_path}

say at line 221. I could add a new input e.g. inputs.before_commands for commands to run outside the image (but after the repo has already been copied in/mounted) if the maintainers were interested in having that as a feature.

Let me know if there's already an option or another recommended approach that doesn't require modifying the action though.

@dbieber
Copy link
Author

dbieber commented Dec 4, 2024

Trying this out in #124.
Context: This is in service of dbieber/GoNoteGo#69.


One apparent disadvantage of the approach I've taken so far is steps.mount_image.outputs.mount isn't known in non_image_commands. So it isn't obvious where to copy the artifact to.

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

1 participant