Skip to content

Commit a599454

Browse files
committed
Support selection of container image
1 parent 468d403 commit a599454

File tree

4 files changed

+38
-3
lines changed

4 files changed

+38
-3
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM sphinxdoc/sphinx:latest
1+
FROM sphinxdoc/sphinx:2.4.4
22

33
LABEL "maintainer"="Ammar Askar <ammar@ammaraskar.com>"
44

Dockerfile.pdflatex

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM sphinxdoc/sphinx-pdflatex:4.3.2
2+
3+
LABEL "maintainer"="Ammar Askar <ammar@ammaraskar.com>"
4+
5+
ADD entrypoint.py /entrypoint.py
6+
ADD sphinx_action /sphinx_action
7+
8+
ENTRYPOINT ["/entrypoint.py"]

Dockerfile.sphinx4

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM sphinxdoc/sphinx:4.3.2
2+
3+
LABEL "maintainer"="Ammar Askar <ammar@ammaraskar.com>"
4+
5+
ADD entrypoint.py /entrypoint.py
6+
ADD sphinx_action /sphinx_action
7+
8+
ENTRYPOINT ["/entrypoint.py"]

action.yml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,25 @@ inputs:
3232
A list of additional 'apt' packages to install before running
3333
sphinx. (Setting this will force-enable 'update' as well.)
3434
required: false
35+
sphinx4:
36+
description:
37+
Use a newer container image based on Sphinx version 4.
38+
required: false
39+
default: false
40+
pdflatex:
41+
description:
42+
Run the build in a container image based on sphinx version 4,
43+
with additional dependencies only needed when generating PDFs.
44+
required: false
45+
default: false
3546
runs:
36-
using: 'docker'
37-
image: 'Dockerfile'
47+
- using: 'docker'
48+
if: ${{ inputs.sphin4 == false && inputs.pdflatex == false }}
49+
image: 'Dockerfile'
50+
- using: 'docker'
51+
if: ${{ inputs.sphinx4 == true && inputs.pdflatex == false }}
52+
image: 'Dockerfile.sphinx4'
53+
- using: 'docker'
54+
if: ${{ inputs.pdflatex == true }}
55+
image: 'Dockerfile.pdflatex'
56+

0 commit comments

Comments
 (0)