Skip to content

Commit

Permalink
Support selection of container image
Browse files Browse the repository at this point in the history
  • Loading branch information
ferdnyc committed Dec 30, 2021
1 parent 468d403 commit a599454
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM sphinxdoc/sphinx:latest
FROM sphinxdoc/sphinx:2.4.4

LABEL "maintainer"="Ammar Askar <[email protected]>"

Expand Down
8 changes: 8 additions & 0 deletions Dockerfile.pdflatex
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM sphinxdoc/sphinx-pdflatex:4.3.2

LABEL "maintainer"="Ammar Askar <[email protected]>"

ADD entrypoint.py /entrypoint.py
ADD sphinx_action /sphinx_action

ENTRYPOINT ["/entrypoint.py"]
8 changes: 8 additions & 0 deletions Dockerfile.sphinx4
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM sphinxdoc/sphinx:4.3.2

LABEL "maintainer"="Ammar Askar <[email protected]>"

ADD entrypoint.py /entrypoint.py
ADD sphinx_action /sphinx_action

ENTRYPOINT ["/entrypoint.py"]
23 changes: 21 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,25 @@ inputs:
A list of additional 'apt' packages to install before running
sphinx. (Setting this will force-enable 'update' as well.)
required: false
sphinx4:
description:
Use a newer container image based on Sphinx version 4.
required: false
default: false
pdflatex:
description:
Run the build in a container image based on sphinx version 4,
with additional dependencies only needed when generating PDFs.
required: false
default: false
runs:
using: 'docker'
image: 'Dockerfile'
- using: 'docker'
if: ${{ inputs.sphin4 == false && inputs.pdflatex == false }}
image: 'Dockerfile'
- using: 'docker'
if: ${{ inputs.sphinx4 == true && inputs.pdflatex == false }}
image: 'Dockerfile.sphinx4'
- using: 'docker'
if: ${{ inputs.pdflatex == true }}
image: 'Dockerfile.pdflatex'

0 comments on commit a599454

Please sign in to comment.