I am trying to commit the docs folder generated in a previous step. This throws the following error after 1s on execFileSync. I found that ENOBUFS is thrown when the maxBuffer (1MB by default) gets exceeded.
This happens to be the case here. When only committing a single HTML file from the docs folder, the action succeeds as expected.
Possible solution
The buffer size can be specified as an option with execFileSync. More in the docs of Node.js. Setting an increased maxBuffer might solve the issue.
Run EndBug/add-and-commit@v4
with:
add: docs
author_name: Github Workflow Bot
author_email: [email protected]
message: build docs and dist
cwd: .
force: false
env:
GITHUB_TOKEN: ***
Using 'Github Workflow Bot <[email protected]>' as author.
Error: spawnSync /home/runner/work/_actions/EndBug/add-and-commit/v4/lib/entrypoint.sh ENOBUFS
at Object.spawnSync (internal/child_process.js:1041:20)
at spawnSync (child_process.js:607:24)
at Object.execFileSync (child_process.js:634:15)
at Object.131 (/home/runner/work/_actions/EndBug/add-and-commit/v4/lib/index.js:1:576)
at __webpack_require__ (/home/runner/work/_actions/EndBug/add-and-commit/v4/lib/index.js:1:154)
at startup (/home/runner/work/_actions/EndBug/add-and-commit/v4/lib/index.js:1:291)
at module.exports.87 (/home/runner/work/_actions/EndBug/add-and-commit/v4/lib/index.js:1:323)
at Object.<anonymous> (/home/runner/work/_actions/EndBug/add-and-commit/v4/lib/index.js:1:333)
at Module._compile (internal/modules/cjs/loader.js:959:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
My workflow yml:
name: Build and release
on:
push:
# branches:
# - master
paths-ignore:
- 'docs/**'
jobs:
node:
name: Node 12
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Sync packages with cache
uses: actions/cache@v1
with:
path: ./node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: ${{ runner.os }}-node_modules-
- name: Install packages
run: yarn install --frozen-lockfile
- name: Build the docs
run: yarn document
- name: Commit docs
uses: EndBug/add-and-commit@v4
with:
add: 'docs'
author_name: Github Workflow Bot
author_email: [email protected]
message: 'build docs'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
I am trying to commit the docs folder generated in a previous step. This throws the following error after 1s on
execFileSync. I found that ENOBUFS is thrown when the maxBuffer (1MB by default) gets exceeded.This happens to be the case here. When only committing a single HTML file from the docs folder, the action succeeds as expected.
Possible solution
The buffer size can be specified as an option with
execFileSync. More in the docs of Node.js. Setting an increasedmaxBuffermight solve the issue.My workflow yml: