-
Notifications
You must be signed in to change notification settings - Fork 38
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
PySpelling output artifact? #68
Comments
Let me give it some thought. |
I have done some experimenting and I came to a solution using Currently it captures all the output of the run of I am working out the details around the preservation of the generated artifact, until now to no avail. You can see the master branch builds issue the warning:
And no artefacts are available yet. zsh> gh api \
-H "Accept: application/vnd.github.v3+json" \
/repos/rojopolis/spellcheck-github-actions/actions/artifacts
{
"total_count": 0,
"artifacts": []
} I could get the artifact generated locally using Docker and I could even inspect it, but testing the action integration, requires some more work and working directly on the repository - not my favorite cup of tea, but I hope I can get it to work |
@jonasbn, thanks for looking into this! I can have a look myself, I have quite some experience with Docker and it is not surprising the file is not found. I do not have much experience with Docker container actions but I can see how I can help out. |
Any assistance would be much appreciated. I am currently looking into how I can extract the generated My current progress is available in the master branch and it is not complete. I will probably create a separate prototype for my investigation and roll back the changes in the master branch, since it was more complicated that expected and I do not want to disrupt the projects possible progress. |
@jonasbn, I can come up with something more concrete in the coming days, but overall my 0.02 $ here are that we need to produce the artifact inside the container in a mounted volume from the runner, so it is accessible after docker has run. For completeness, the list of mounted volumes (
Also note that the working directory inside the container is I guess you could naively specify a file in the working directory as |
I will evaluate your proposal tonight. I think you cracked it 8-) |
I have made a successful implementation based on your guidance - thank you very much. I will now update the documentation, so this new feature can be adopted by others. Thank you for your contribution and patience. Any additional feedback are of course most welcome. |
Happy to help out @jonasbn! A couple of additional notes from my side (1) The way I hinted at exposing
however the way it is implemented in the entrypoint (and how the input parameter is documented) always writes to spellcheck-output.txt spellcheck-github-actions/entrypoint.sh Lines 91 to 95 in 3b68955
(2) As documented in https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions
The entrypoint appears to be working a.t.m. since Putting this together, besides updating the documentation to reflect the actual meaning of if [ -n "$INPUT_OUTPUT_FILE" ]; then
echo "Producing spellcheck output fie >$INPUT_OUTPUT_FILE<"
pyspelling --config $SPELLCHECK_CONFIG_FILE $TASK_NAME $SOURCES_LIST | tee $INPUT_OUTPUT_FILE
else
pyspelling --config $SPELLCHECK_CONFIG_FILE $TASK_NAME $SOURCES_LIST
fi |
I just saw your comment now, I wish I had seen it earlier. I believe I have addressed the issues you pointed out. I ran into them testing the implementation. I will not release anything tonight since I am too tired, but I plan to release tomorrow. You are welcome to give make a review of #96 |
First of all, thanks for the great work with this action! 👏
This might be a tricky one, but would it be possible to offer the possibility of dumping the output from pyspelling to a file (in addition to what we see in the workflow log), to allow uploading it as artifact in workflows using this action?
The text was updated successfully, but these errors were encountered: