Closed mikebell closed 1 year ago
I'm also having the same issue but it's happening locally and I'm also trying to automate this in a pipeline.
@CAinDE I finally got around to looking into this again and figured it out, you need to explicitly call the path:
- uses: docker://pandoc/extra:3.1.1.0
with:
args: content/cv.md --output=content/cv.pdf --template /.pandoc/templates/eisvogel.latex --listings -V block-headings
Doing this works. I'm not fully sure what the intended behavior is supposed to be but will leave this issue open.
Hi @mikebell !
thanks for reporting this issue and for the detailed workaround.
The problem occurs because Github Actions runners will always redefine the value of $HOME environment variable to /github/home
.
This is hardcoded and users can't overide it.
See https://github.com/actions/runner/issues/863
A basic workaround would be to add a symlink inside the pandoc/extra
image, like this
mkdir -p /github/home
ln -s /root $HOME
but I'm a bit reluctant to do that sort of ugly patch just because someone at Github decided to mess with $HOME without any clear justification...
Hey thanks for getting in touch, completely understand it's not down to the containter to fix the issue.
Would you be willing to accept an updated readme with a section on running it on GHA? Potentially updating https://github.com/pandoc/pandoc-action-example with an example for using the extra image.
Sure !
This should be documented
Sorry! Finally gotten round to making the PR https://github.com/pandoc/pandoc-action-example/pull/30
I'm trying to automate a markdown to pdf conversion using the pandoc/extra image in github actions:
When this runs it gives the following error:
Running locally works as expected and generates the PDF:
Happy to provide more information.