-
-
Notifications
You must be signed in to change notification settings - Fork 269
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
Truncated output from Github Action #110
Comments
The output is usually truncated due to Github's environment limits. The error message might show up as "Error: Argument list too long" if we try to echo the generated output. Added a fix that redirects the generated JSON into a file ( - name: Running Gautam's Blog post workflow
uses: gautamkrishnar/blog-post-workflow@master
id: blogpost_workflow
with:
comment_tag_name: ${{inputs.comment_tag_name}}
commit_message: "Updated Badge with latest number of articles"
feed_list: ${{inputs.feed_list}}
max_post_count: 1000000
output_only: true
- name: Echo the length
run: echo $(jq '. | length' /tmp/blog_post_workflow_output.json) |
@gautamkrishnar , hello there, I'm getting a new error by following the instructions above in this workflow run Sorry, I'm not very familiar with using jq 😅
|
@lyqht what are you trying to do, can you please explain the use case you are trying to achieve. |
@lyqht it was a bug 🤣 , fixed it. Please use the following code to get the length: name: Latest blog post length
on:
schedule:
- cron: '*/5 * * * *'
workflow_dispatch:
jobs:
update-readme-with-blog:
name: Update this repo's README with latest blog posts
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Insatall jq
run: sudo apt install -y jq
- uses: gautamkrishnar/blog-post-workflow@master
with:
commit_message: "Updated readme with the latest blogposts"
feed_list: "https://esteetey.dev/rss.xml"
max_post_count: 1000
output_only: true
- name: Saves count as an output
id: count-step
run: echo "::set-output name=articles_length::$(jq '. | length' /tmp/blog_post_workflow_output.json)"
- name: Prints count
run: echo ${{ steps.count-step.outputs.articles_length }}
Thanks for reporting it 😄 |
Able to get it now
Thank you for the fix 👍 |
@gautamkrishnar fs.mkdirSync(path.join("/", "tmp"), {recursive: true}); |
@ProjectSoft-STUDIONIONS that's strange. i will take a look at it when I have time. |
Describe the bug
Using the action with the following .yml of
output_only=true
The output I got is truncated. An example can be seen from this workflow run under the
Run cd /home/runner/work/_actions/lyqht/article-count-workflow/main && npm install && node articleCount.js
commandExpected behavior
I don't actually require the full array of content, for my purposes, I just wanted to get the array count of the all the articles from the feeds.
Workflow Yml Used
The text was updated successfully, but these errors were encountered: