Comments (3)
To do that via docker-run steps in an actions workflow you would either need to install Python into the Pandoc image or Pandoc into some image of your own. Personally I'd suggest a 3rd route of just making your own image with your own tools and using that as your runner.
For example you could do this with Nix:
shell.nix
: (in your project's root)
with import <nixpkgs> {};
mkShell {
nativeBuildInputs = [ python pandoc ];
}
.github/workflow/build.yml
: (step)
- name: Run builder in nix
uses: docker://nixos/nix
run: |
nix-shell --run ./build.py
Similar things could be done with almost any Linux distro base image of your choice (that happens to have Pandoc and Python packages).
from pandoc-action-example.
I found a better way to do this. Github Action actually lets you run jobs inside docker containers, rather simply using the entrypoint's of a given container (which is currently the only version specified in the README). This is done by specifying the container
value of a job. For example,
name: Build
on: push
jobs:
convert_via_pandoc:
runs-on: ubuntu-20.04
container:
image: pandoc/core:2.9
steps:
- uses: actions/checkout@v2
- run: pandoc README.md -o README.html
This way, it's a lot easier to build custom images with custom dependencies, specifying the container
value, then having access to all those executables in your PATH
in the rest of the job script. For example, I built a custom image that adds the python3
dependency: tigernie/pandoc-python3,
Should we add this to the README for when people come to this repo from search with this use case in mind?
from pandoc-action-example.
We already have a PR mentioning the parent container method, see #11. Note this does have a downside of not being able to run other Action tooling via uses:
as easily because many of them depend on the tooling in the Ubuntu base images.
That aside, the container trick in itself doesn't answer your original question because it doesn't have the other tooling you need in the Pandoc image. Making your own image with your own tools is certainly viable (and what I recommended above) but I'm not sure how best to document that as there are so many possible variants of that with different distros, places to keep sources or images, etc. It can be done via external images as you've done or even in the same project (you can use a Dockerfile from the current repo to run containers in CI).
from pandoc-action-example.
Related Issues (19)
- migrate pandoc action example repo (this) to pandoc org HOT 15
- Deprecated functionality in github action HOT 2
- Executable not found in $PATH HOT 18
- Missing package HOT 13
- Multiple outputs HOT 2
- openBinaryFile: does not exist (No such file or directory) HOT 2
- Cache the pulled Docker image with GHA? HOT 5
- Error: pdflatex not found HOT 1
- How to run pandoc using a Windows runner? HOT 1
- obstacle replicating example "long usage" HOT 12
- feature suggestion, addition of a workflows to GitHub's interface
- Add note about argument order HOT 1
- Install additional Lua modules
- Reference r-lib's action to setup pandoc HOT 2
- Install additional packages to the docker file HOT 4
- Typo in README HOT 2
- Add support for choosing working directory HOT 4
- Add support for pandoc-include HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pandoc-action-example.